As we've discussed, the expected keys are inserted to the input
subsystem correctly. They aren't getting to you via your serial connection and that's actually what should happen.
See, when you use serial connection, input and output for /dev/console
come from /dev/ttyS*
instead from a keyboard and a screen. This means the keyboard is not connected to the console or to the serial connection, so keys inserted via the keyboard will not get to you via serial.
However, all input from keyboards in the system get via the kbd
input handler (see kbd_handler
in drivers/tty/vt/keyboard.c
) into vt
. vt
stands for 'virtual terminal' and it maintains several terminal sessions under the same screen+keyboard setup. These are the terminals you can switch to using ctrl+alt+f*
on ubuntu
, and these are the terminals under /dev/tty*
The same setup can be simulated by using qemu
in -nographic
mode. Then simulating keyboard input with sendkey
in qemu
's monitor, and seeing the output via the screendump
monitor command.
To get the information from vt
to you you can stick a shell on the vt
like this: PS1='shell$ ' setsid sh -c "exec sh -i </dev/tty1 >/dev/ttyS0 2>&1"
.
KEY_1
(numerical value - 2) for keypad key "1". I encoded them myself through Device Tree. Here you can take a look at the bindings. But it seems to me that the issue is not driver-related(since driver program flow is normal), but rather environmental.KEY_NUMERIC_1
instead ofKEY_1
but the result remained the sameevtest
to make sure the character isn't written anywhere else? Also, what exactly is your setup? What do you run on your beaglebox? Is it a raw kernel with busybox?cat /dev/input/eventX
prints something unrecognizable on keypress.