[libhid-discuss] Report Descriptors
Wesley Revens
wrevens at aminocom.com
Thu Nov 9 15:47:23 CET 2006
Hi,
After my previous problem, I found that my device was having a problem
responding to the request to get the HID descriptor which was resulting
in a broken pipe error I managed to get around this by requesting the
config descriptor and parsing the results in order to get the HID
descriptor. The device has no problem responding to a request for a
report descriptor however the data returned by the device in response to
a report descriptor request does not look very useful.
When I run test_libhid I get the following for hid_dump_tree:
TRACE: hid_dump_tree(): iterating the parse tree for USB device
001/002[0]...
parse tree of HIDInterface 001/002[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: 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
001/002[0]...
And in lsusb the results are:
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x40
Self Powered
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 8
bInterval 255
Language IDs: (length=4)
0000 (null)((null))
Bus 001 Device 002: ID 8508:5357
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 10.01
bDeviceClass 0 Interface
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x8508
idProduct 0x5357
bcdDevice 1.00
iManufacturer 1 R2DI LLC
iProduct 2 iBOX
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 73
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Devices
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 3 Keyboard
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0
bNumDescriptors 1
bDescriptorType 34 (null)
wDescriptorLength 65
Report Descriptor: (length is 65)
Item(Global): (null), data= [ 0x01 ] 1
(null)
Item(Local ): (null), data= [ 0x06 ] 6
(null)
Item(Main ): (null), data= [ 0x01 ] 1
Application
Item(Global): (null), data= [ 0x07 ] 7
(null)
Item(Local ): (null), data= [ 0xe0 ] 224
(null)
Item(Local ): (null), data= [ 0xe7 ] 231
(null)
Item(Global): (null), data= [ 0x00 ] 0
Item(Global): (null), data= [ 0x01 ] 1
Item(Global): (null), data= [ 0x01 ] 1
Item(Global): (null), data= [ 0x08 ] 8
Item(Main ): (null), data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Global): (null), data= [ 0x01 ] 1
Item(Global): (null), data= [ 0x08 ] 8
Item(Main ): (null), data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Global): (null), data= [ 0x05 ] 5
Item(Global): (null), data= [ 0x01 ] 1
Item(Global): (null), data= [ 0x08 ] 8
usbdevfs: process 581 (lsusb) did not claim interface 1 before use
(null)
Item(Local ): (null), data= [ 0x01 ] 1
(null)
Item(Local ): (null), data= [ 0x05 ] 5
(null)
Item(Main ): (null), data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Global): (null), data= [ 0x03 ] 3
Item(Global): (null), data= [ 0x01 ] 1
Item(Main ): (null), data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Global): (null), data= [ 0x06 ] 6
Item(Global): (null), data= [ 0x08 ] 8
Item(Global): (null), data= [ 0x00 ] 0
Item(Global): (null), data= [ 0xff 0x00 ] 255
Item(Global): (null), data= [ 0x07 ] 7
(null)
Item(Local ): (null), data= [ 0x00 ] 0
(null)
Item(Local ): (null), data= [ 0xff 0x00 ] 255
(null)
Item(Main ): (null), data= [ 0x00 ] 0
Data Array Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Main ): (null), data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 8
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 1
bInterval 10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Devices
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 4 Control
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0
bNumDescriptors 1
bDescriptorType 34 (null)
wDescriptorLength 32
Report Descriptor: (length is 32)
Item(Global): (null), data= [ 0x00 0xff ] 65280
(null)
Item(Local ): (null), data= [ 0x01 ] 1
(null)
Item(Main ): (null), data= [ 0x01 ] 1
Application
Item(Local ): (null), data= [ 0x01 ] 1
(null)
Item(Local ): (null), data= [ 0x10 ] 16
(null)
Item(Global): (null), data= [ 0x00 ] 0
Item(Global): (null), data= [ 0x01 ] 1
Item(Global): (null), data= [ 0x01 ] 1
Item(Global): (null), data= [ 0x10 ] 16
Item(Main ): (null), data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Global): (null), data= [ 0x08 ] 8
Item(Global): (null), data= [ 0x08 ] 8
Item(Local ): (null), data= [ 0x01 ] 1
(null)
Item(Local ): (null), data= [ 0x08 ] 8
(null)
Item(Main ): (null), data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position
Non_Volatile Bitfield
Item(Main ): (null), data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 8
bInterval 100
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 8
bInterval 10
Language IDs: (length=4)
0409 (null)((null)
The (nulls) in the report descriptor lsusb ouput and the hid_dump_tree
data look strange. I believe that the device firmware is incorrect
however is there anything else that I could be doing wrong?
More information about the libhid-discuss
mailing list