# usb-hid barcode scanner(win. no *nix)

## Quad99x

USB Barcode Scanner (zb-8150)

I have not had any luck with this device in any linux distribution.  Plug-and-plays in winders.

The device reads the barcode, makes a sucessful beepsound and sends the translated text to the screen in windows.  In linux it beeps with the unsucessful tone and then does nothing.

The company acts like it should be about the same as plugging in a usb keyboard and I thought thats how it worked, but now I'm not sure.

My hardware skills with linux leave a lot to be desired.  I dont know if this device is just not compatable or if I just havent figured out the trick.  

[edit - posted wrong machine's uname]

uname -a

 *Quote:*   

> Linux gen2 2.6.19-gentoo-r5 #1 SMP Wed Feb 21 12:29:12 CST 2007 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux

 

dmesg after device attached 

 *Quote:*   

> 
> 
> usb 2-2: new low speed USB device using uhci_hcd and address 7
> 
> usb 2-2: configuration #1 chosen from 1 choice
> ...

 

the devices output from lsusb -v

```

Bus 002 Device 005: ID 04b4:de61 Cypress 

Semiconductor Corp. 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               1.10

  bDeviceClass            0 (Defined at 

Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0         8

  idVendor           0x04b4 Cypress 

Semiconductor Corp.

  idProduct          0xde61 

  bcdDevice            2.50

  iManufacturer           1 Guest

  iProduct                2 Generic KB-HID

  iSerial                 0 

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           34

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          4 HID KB

    bmAttributes         0xa0

      Remote Wakeup

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           1

      bInterfaceClass         3 Human 

Interface Devices

      bInterfaceSubClass      1 Boot 

Interface Subclass

      bInterfaceProtocol      1 Keyboard

      iInterface              5 EP1

        HID Device Descriptor:

          bLength                 9

          bDescriptorType        33

          bcdHID               1.00

          bCountryCode            0 Not 

supported

          bNumDescriptors         1

          bDescriptorType        34 Report

          wDescriptorLength      64

          Report Descriptor: (length is 64)

            Item(Global): Usage Page, data= 

[ 0x01 ] 1

                            Generic Desktop 

Controls

            Item(Local ): Usage, data= [ 

0x06 ] 6

                            Keyboard

            Item(Main  ): Collection, data= 

[ 0x01 ] 1

                            Application

            Item(Global): Usage Page, data= 

[ 0x07 ] 7

                            Keyboard

            Item(Local ): Usage Maximum, 

data= [ 0xe7 ] 231

                            GUI Right

            Item(Local ): Usage Minimum, 

data= [ 0xe0 ] 224

                            Control Left

            Item(Global): Logical Maximum, 

data= [ 0x01 ] 1

            Item(Global): Logical Minimum, 

data= [ 0x00 ] 0

            Item(Global): Report Size, data= 

[ 0x01 ] 1

            Item(Global): Report Count, 

data= [ 0x08 ] 8

            Item(Main  ): Input, data= [ 

0x02 ] 2

                            Data Variable 

Absolute No_Wrap Linear

                            Preferred_State 

No_Null_Position Non_Volatile Bitfield

            Item(Global): Report Count, 

data= [ 0x01 ] 1

            Item(Global): Report Size, data= 

[ 0x08 ] 8

            Item(Main  ): Input, data= [ 

0x01 ] 1

                            Constant Array 

Absolute No_Wrap Linear

                            Preferred_State 

No_Null_Position Non_Volatile Bitfield

            Item(Global): Report Count, 

data= [ 0x05 ] 5

            Item(Global): Report Size, data= 

[ 0x01 ] 1

            Item(Global): Usage Page, data= 

[ 0x08 ] 8

                            LEDs

            Item(Local ): Usage Maximum, 

data= [ 0x05 ] 5

                            Kana

            Item(Local ): Usage Minimum, 

data= [ 0x01 ] 1

                            NumLock

            Item(Main  ): Output, data= [ 

0x02 ] 2

                            Data Variable 

Absolute No_Wrap Linear

                            Preferred_State 

No_Null_Position Non_Volatile Bitfield

            Item(Global): Report Count, 

data= [ 0x01 ] 1

            Item(Global): Report Size, data= 

[ 0x03 ] 3

            Item(Main  ): Output, data= [ 

0x01 ] 1

                            Constant Array 

Absolute No_Wrap Linear

                            Preferred_State 

No_Null_Position Non_Volatile Bitfield

            Item(Global): Report Count, 

data= [ 0x06 ] 6

            Item(Global): Report Size, data= 

[ 0x08 ] 8

            Item(Global): Logical Maximum, 

data= [ 0xe7 0x00 ] 231

            Item(Global): Logical Minimum, 

data= [ 0x00 ] 0

            Item(Global): Usage Page, data= 

[ 0x07 ] 7

                            Keyboard

            Item(Local ): Usage Maximum, 

data= [ 0xe7 ] 231

                            GUI Right

            Item(Local ): Usage Minimum, 

data= [ 0x00 ] 0

                            No Event

            Item(Main  ): Input, data= [ 

0x00 ] 0

                            Data Array 

Absolute No_Wrap Linear

                            Preferred_State 

No_Null_Position Non_Volatile Bitfield

            Item(Main  ): End Collection, 

data=none

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            3

          Transfer Type            Interrupt

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0008  1x 8 

bytes

        bInterval              10

```

Last edited by Quad99x on Thu Mar 29, 2007 1:32 am; edited 1 time in total

----------

## deface

Telephone (908) 359-2070

or

http://www.zbausa.com/contact.asp#CNT

----------

## Quad99x

Yes, that is where the scanners were ordered from.  I called their tech support earlier in the day.  Do you work there? is there someone in particular i shoud contact?

----------

## Quad99x

I threw out the question on the gentoo irc channel.  Some responded that I should make a userspace driver; that it wasnt extremely hard, just tedious; that i should get a usb sniffer for windows; and use libusb.

I suppose i will embark on that journey.  Is there any other refrence/site that someone knows of that might aid me on this adventure.

----------

## Quad99x

A linux guru at work gave the advice that I should not need to make my own driver.

He suggested that I find out if the device is getting matched up to the the hid keyboard driver, as this is what should make it work.  He also mentioned udev rules as being something I may need to look into.  Another thing I looked at was USB legacy option in the BIOS, it was turned on.

How do I go about finding out what driver  is getting bound to this USB device?  Based on the descriptors in the usb output and the fact that it is described as a keyboard hid device, I would think the right driver would be applied, but I'm not certain.

----------

## Quad99x

I found a usb barcode which works.  I'm hoping this will shed light on why the other one doesn't work.

When I attach this device i get the same vendor as the other one and a different device id.

My lsusb looks like this:

 *Quote:*   

> 
> 
> Bus 003 Device 001: ID 0000:0000  
> 
> Bus 004 Device 001: ID 0000:0000  
> ...

 

But when I attach this device it adds a device node pointing to the input stream

dev before plugged in

 *Quote:*   

> 
> 
> gen2 input # ls -l /dev/input/
> 
> total 0
> ...

 

dev after plugged in

 *Quote:*   

> 
> 
> gen2 input # ls -l /dev/input/
> 
> total 0
> ...

 

----------

