[lkml]   [2006]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: The Input Layer and the Serial Port
On Wed, 2006-12-27 at 13:54 -0600, Loye Young wrote:
> I, a humble pilgrim in the Land of Tux, have spent over a year seeking
> a simple answer to what seems to me a simple question: How do I expose
> my RS232 barcode scanner to the input layer so that the scanned
> information shows up in applications? Basically, I need the scanner to
> act like another keyboard. Scan a code, see the numbers.

I can give you some hints but it will involve writing a program. It can
all be done in userspace though, saving any pain of messing with the
kernel internally/kernel recompiling.

The kernel has a driver called uinput which lets you inject input events
into the kernel from a userspace piece of code. You can write a program
to read data from /dev/ttyS0 (at 9600bps) and pass it to this uinput
driver. That should then do exactly what you need.

Working out for to use uinput caused me a few headaches but I can point
you at some example code:

This code adds support for offscreen soft "buttons" on a touchscreen. It
passes the key events to the kernel via uinput.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-12-28 17:19    [W:0.039 / U:4.248 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site