Matt Mossholder on 5 Mar 2009 16:58:47 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Need Help with Barcode Scanner

----- "Casey Bralla" <> wrote:

> I just bought a cheap barcode scanner from New Egg.   It is a USB
> scanner and 
> works fine with Windows (no drivers)
> I'm trying to get it to work with Gentoo.   So far, no go.
> I added a section in my xorg.conf file to setup a second keyboard (and
> it 
> works fine with a USB keybard (my normal keyboard is a ps/2 type).
> But the scanner scans the barcode, then halts, apparently because the
> USB data 
> is not being sucked into the PC like a keybaord stream.
> LSUSB sees the scanner, and dmesg recognizes it, but I can't get it 
> dump "keystrokes" to standard input.
> Anuybody got any ideas?

I have a USB CueCat scanner. It also shows up as a USB keyboard. Unfortunately (for you at least), in my case it "just works". I didn't have to touch xorg.conf to have it recognize the scanner. Scanning a barcode just sends to appropriate keystrokes into X, the same way the primary keyboard does.

If you are using Debian/Ubuntu, you could try poking around in the input subsystem, by installing the input-utils package. In particular, check out lsinput (root privs required!), which will list out all of the input devices attached to the system.

Here's the lsinput output for my CueCat:

   bustype : BUS_USB
   vendor  : 0x458
   product : 0x101
   version : 272
   name    : ":Cue:CAT"
   phys    : "usb-0000:00:02.0-10/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_REP

EV_KEY means the device can send keypress events. 

input-events May also help. Run `input-events <device number>' and it will show you all the events from that device. You probably need to stop running X for this to work right, however.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --