[libhid-discuss] reading from a barcode scanner that acts like a keyboard

Brice Rebsamen brice.brice at gmail.com
Mon Nov 6 06:31:01 CET 2006


I don't want to use stdin because I am using the keyboard (the real one) for
other purpose.

In /dev/input I only have nodes related to mice on the system, but that
would be very convenient to have a node there. I am using a USB-serial
adaptor in an other project and the kernel creates a node at /dev/ttyUSB0
that is really convenient to use.
When I plug in the scanner, a node is created in /dev/bus/usb/00X/00X. I
tried to cat it but it just returns gibberish and exits.

Brice



On 11/6/06, Peter Stuge <stuge-libhid at cdy.org> wrote:
>
> On Mon, Nov 06, 2006 at 10:53:11AM +0800, Brice Rebsamen wrote:
> > I have a USB barcode scanner that acts like a keyboard: whenever a
> > barcode is read it sends the code where the keyboard would normally
> > write. I am writing some code in C to read from the scanner.
>
> Is it impossible for you to take advantage of this fact?
>
> Ie. just read from stdin or /dev/input/*
>
>
> //Peter
>
> _______________________________________________
> libhid-discuss mailing list
> libhid-discuss at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20061106/37c5150b/attachment-0001.htm


More information about the libhid-discuss mailing list