[libhid-discuss] Multiple duplicate interfaces?
Frank Rizzo
thefrankrizzo at hotmail.com
Sat Oct 2 19:20:07 UTC 2010
Hey guys, I'm trying to work with a barcode scanner that thinks it's a
keyboard.
What path do I use for this? (Probably more data that you need below, but I
believe in being through).
Frank
When I run test_libhid, I get a bunch of duplicates:
parse tree of HIDInterface 005/004[0]:
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x90
path: 0x00010006.0x00000000; type: 0x90
path: 0x00010006.0x00000000; type: 0x90
path: 0x00010006.0x00000000; type: 0x90
path: 0x00010006.0x00000000; type: 0x90
path: 0x00010006.0x00000000; type: 0x90
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
path: 0x00010006.0x00000000; type: 0x80
TRACE: hid_reset_parser(): resetting the HID parser for USB device
005/004[0]...
Here is the raw report descriptor:
TRACE: hid_prepare_parser(): dumping the raw report descriptor
TRACE: hid_prepare_parser(): 0x000: 0x05 0x01 0x09 0x06 0xa1 0x01 0x05
0x07
TRACE: hid_prepare_parser(): 0x008: 0x19 0xe0 0x29 0xe7 0x15 0x00 0x25
0x01
TRACE: hid_prepare_parser(): 0x010: 0x75 0x01 0x95 0x08 0x81 0x02 0x95
0x01
TRACE: hid_prepare_parser(): 0x018: 0x75 0x08 0x81 0x01 0x95 0x05 0x75
0x01
TRACE: hid_prepare_parser(): 0x020: 0x05 0x08 0x19 0x01 0x29 0x05 0x91
0x02
TRACE: hid_prepare_parser(): 0x028: 0x95 0x01 0x75 0x03 0x91 0x01 0x95
0x06
TRACE: hid_prepare_parser(): 0x030: 0x75 0x08 0x15 0x00 0x26 0xff 0x00
0x05
TRACE: hid_prepare_parser(): 0x038: 0x07 0x19 0x00 0x2a 0xff 0x00 0x81
0x00
TRACE: hid_prepare_parser(): 0x040: 0xc0
and the lsusb -vvv output:
Bus 005 Device 004: ID 04b4:0201 Cypress Semiconductor Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.01
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0x0201
bcdDevice 0.01
iManufacturer 1 Cypress
iProduct 2 Cypress USB Keyboard
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 HID Keyboard
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 5 EndPoint1 Interrupt
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 65
Report Descriptor: (length is 65)
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 Minimum, data= [ 0xe0 ] 224
Control Left
Item(Local ): Usage Maximum, data= [ 0xe7 ] 231
GUI Right
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
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 Minimum, data= [ 0x01 ] 1
NumLock
Item(Local ): Usage Maximum, data= [ 0x05 ] 5
Kana
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 Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Usage Page, data= [ 0x07 ] 7
Keyboard
Item(Local ): Usage Minimum, data= [ 0x00 ] 0
No Event
Item(Local ): Usage Maximum, data= [ 0xff 0x00 ] 255
(null)
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
Device Status: 0x0002
(Bus Powered)
Remote Wakeup Enabled
More information about the libhid-discuss
mailing list