[gentoo-user] USB barcode scanner

2009-05-03 Thread dhk
I have a 2-dimensional usb bar code scanner that I'm trying to get 
working ( This is the exact one if interested: 
http://www.barcodesinc.com/metrologic/ms1690.htm ).  It scans, but 
nothing gets displayed.  How can I get the focused window/terminal to 
understand that the device should be treated as stdin?  The output from 
lsusb and lsusb -D is below.  Thanks,


# lsusb
Bus 006 Device 001: ID 1d6b:0001
Bus 005 Device 002: ID 0c2e:0720 Metro
Bus 005 Device 001: ID 1d6b:0001
Bus 004 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
Bus 001 Device 001: ID 1d6b:0002
# lsusb -D /proc/bus/usb/005/002
Device: ID 0c2e:0720 Metro
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize016
  idVendor   0x0c2e Metro
  idProduct  0x0720
  bcdDevice   53.57
  iManufacturer   1 Metrologic
  iProduct2 Metrologic Scanner
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   41
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  3 POS USB
bmAttributes 0x80
  (Bus Powered)
MaxPower  450mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass  0
  bInterfaceProtocol  0
  iInterface  0
  ** UNRECOGNIZED:  09 21 11 01 00 01 22 3f 00
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval  10
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval  10
Device Status: 0x
  (Bus Powered)
#


Thanks again,

dave



Re: [gentoo-user] USB barcode scanner

2009-05-03 Thread Roy Wright
dhk wrote:
 I have a 2-dimensional usb bar code scanner that I'm trying to get
 working ( This is the exact one if interested:
 http://www.barcodesinc.com/metrologic/ms1690.htm ).  It scans, but
 nothing gets displayed.  How can I get the focused window/terminal to
 understand that the device should be treated as stdin?  The output from
 lsusb and lsusb -D is below.  Thanks,
 

It doesn't look like you have the HID keyboard version.  I have an ID
Tech IDT4439U which when plugged in behaves like a keyboard.  In the
following lsusb output, notice the iConfiguration and bInterfaceClass
parameters.  My wild guess is you will need a driver.  Also you may want
to verify you have CONFIG_HID* enabled in your kernel config.

HTH,
Roy

Bus 006 Device 003: ID 04b4:0101 Cypress Semiconductor Corp. Keyboard/Hub
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.00
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor   0x04b4 Cypress Semiconductor Corp.
  idProduct  0x0101 Keyboard/Hub
  bcdDevice0.01
  iManufacturer   1 Marson
  iProduct2 Marson Barcode/USB Link KDBv1.21
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   34
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  4 HID Keyboard / Mouse
bmAttributes 0xa0
  (Bus Powered)
  Remote Wakeup
MaxPower  100mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 3 Human Interface Device
  bInterfaceSubClass  1 Boot Interface Subclass
  bInterfaceProtocol  1 Keyboard
  iInterface  5 EP1 Interrupt
HID Device Descriptor:
  bLength 9
  bDescriptorType33
  bcdHID   1.00
  bCountryCode0 Not supported
  bNumDescriptors 1
  bDescriptorType34 Report
  wDescriptorLength  63
 Report Descriptors:
   ** UNAVAILABLE **
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval  10
Device Status: 0x0002
  (Bus Powered)
  Remote Wakeup Enabled

# grep HID /usr/src/linux/.config
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HID_DEBUG=y
CONFIG_HIDRAW=y
CONFIG_USB_HID=y
# CONFIG_HID_PID is not set
CONFIG_USB_HIDDEV=y
# Special HID drivers
CONFIG_HID_COMPAT=y
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
CONFIG_HID_BRIGHT=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_CYPRESS=y
CONFIG_HID_DELL=y
CONFIG_HID_EZKEY=y
CONFIG_HID_GYRATION=y
CONFIG_HID_LOGITECH=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
CONFIG_HID_PANTHERLORD=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SUNPLUS=y
# CONFIG_USB_PHIDGET is not set