Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 5 years ago

Last modified 5 years ago

#440 accepted enhancement

Serial terminal emulation/deemulation library

Reported by: svoboda Owned by: svoboda
Priority: major Milestone:
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also: #156, #319

Description

In the world of UNIX-like operating systems command-line applications can make use of a pseudo-graphical UI via [n]curses or a similar library. This provides commands like move cursor, set color, etc. Conversely keyboard input (including some control keys like arrows, Page Up, etc) can be retrieved by the application. However only a dumb serial line / character device is assumed to connect the application to the console.

Therefore all the pseudo-graphical commands are marshaled into a character stream (escape sequences) by the curses library and unmarshaled by the console. Conversely the keyboard input is marshaled by the console and unmarshaled by the curses library. This is the common cause of many problems.

In HelenOS the application talks directly to the console via an IPC interface (much like in some other OS). This has many benefits, but there is one catch: How do we communicate with the UNIX-like world that expects serial terminals?

There are two cases:

  • Console is driven by something that normally talks to a serial terminal (1)
  • A serial terminal [emulator] talks to something which expects a console (2)

The examples of (1) are: ported application that generates terminal sequences manually, remote stty client (telnet, ssh). The examples of (2) are: remote serial terminal server (ssh server, telnet server), HelenOS serial HID (such as in msim, GXemul, ski, serial line).

The latter case (2) is more difficult, because an input method needs to be implemented to extend the capabilities of the serial input to the capabilities of a keyboard device (such as key combos).

Currently the serial terminal-related functionality in HelenOS is scattered about. We need a library that would be able to translate from and to serial terminal escape sequences (for both graphical commands and key inputs) for different terminal types. We also need an input method for serial terminals.

This library/libraries could then be used in existing code (serial HID, remcons) and future code (telnet/ssh client, stty emulator for msim).

Change History (2)

comment:1 Changed 5 years ago by svoboda

  • See also set to #156, #319

comment:2 Changed 5 years ago by svoboda

  • Owner set to svoboda
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.