Subject: Re: login on console=tty with serial input

From: Alessandro Rubini <[email-masked]>
Date: Fri, 16 Mar 2007 23:42:45 +0100

> As GUI library, I started to evaluate Nano-X, FLTK and wxWitgets. But there
>  is the problem that I don't have keyboard input whether form the serial
>  line nor form a remote shell (Ethernet).

What you type in the serial console reaches user space in /dev/ttyS0
or whatever the name on your platform. What you type in the network
connection reaches user space in the socket, where the server (sshd,
telnetd or whatever) pushes it back to a pty master, so your shell
reads it from the pty (slave) is has on its stdin.

Programs using /dev/fb usually open /dev/tty1 (or /dev/tty2 etc) to
read keyboard input from. The device driver that manages it is nether
the serial driver nor the pty driver, but the "virtual console" one.
What is reported there as keypresses are the input events reported by
a keyboard.
 
> As far I understand the matter the problem is that the console that is
>  running on the frame buffer needs as input a keyboard device and not a
>  serial line. Unfortunately I found till now no solution to redirect the
>  serial line to a keyboard device.

Read /dev/ttyS0 and post keypress events associated to the ascii data
you read. Your graphic environment will see them. You can write
your own module to post keyboard data or use uinput (CONFIG_INPUT_UINPUT).

hope this helps
/alessandro