<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 12pt; color: #000000'>Thanks for the pointer to usbsnoop solution - this appears to work!<br><br>Ron<br><br><br>----- Original Message -----<br>From: "Charles Lepple" <clepple@ghz.cc><br>To: rbjones999@comcast.net<br>Cc: libhid-discuss@lists.alioth.debian.org<br>Sent: Tuesday, August 25, 2009 6:26:04 PM GMT -06:00 US/Canada Central<br>Subject: Re: [libhid-discuss] Timeout getting HID Descriptor<br><br>On Aug 25, 2009, at 5:46 PM, rbjones999@comcast.net wrote:<br><br>> Hello,<br>><br>> I'm getting a timeout getting the HID Descriptor from a third party <br>> device. Here is the lsusb -vvv output:<br>><br>> Bus 005 Device 002: ID 0483:5057 SGS Thomson Microelectronics<br>[...]<br>> Report Descriptor: (length is 34)<br>> Item(Global): Usage Page, data= [ 0xa0 0xff ] 65440<br>> (null)<br>> Item(Local ): Usage, data= [ 0xa5 ] 165<br>> (null)<br>> Item(Main ): Collection, data= [ 0x01 ] 1<br>> Application<br>> Item(Local ): Usage, data= [ 0xa6 ] 166<br>> (null)<br>> Item(Local ): Usage, data= [ 0xa7 ] 167<br>> (null)<br>> Item(Global): Logical Minimum, data= [ 0x80 ] 128<br>> Item(Global): Logical Maximum, data= [ 0x7f ] 127<br>> Item(Global): Report Size, data= [ 0x08 ] 8<br>> Item(Global): Report Count, data= [ 0x3c ] 60<br>> Item(Main ): Input, data= [ 0x02 ] 2<br>> Data Variable Absolute No_Wrap Linear<br>> Preferred_State No_Null_Position <br>> Non_Volatile Bitfield<br>> Item(Local ): Usage, data= [ 0xa9 ] 169<br>> (null)<br>> Item(Global): Logical Minimum, data= [ 0x80 ] 128<br>> Item(Global): Logical Maximum, data= [ 0x7f ] 127<br>> Item(Global): Report Size, data= [ 0x08 ] 8<br>> Item(Global): Report Count, data= [ 0x3c ] 60<br>> Item(Main ): Output, data= [ 0x02 ] 2<br>> Data Variable Absolute No_Wrap Linear<br>> Preferred_State No_Null_Position <br>> Non_Volatile Bitfield<br>> Item(Main ): End Collection, data=none<br>[...]<br>> can't get debug descriptor: Connection timed out<br>> cannot read device status, Connection timed out (110)<br><br>Despite the timeout messages, lsusb got the HID report descriptor.<br><br>> Note the timeouts at the end. And here is the output of the HID test <br>> program, modified to match this device:<br>><br>> TRACE: hid_find_usb_device(): inspecting USB device 005/002[0]...<br>> TRACE: hid_compare_usb_device(): comparing match specifications to <br>> USB device...<br>> TRACE: hid_compare_usb_device(): inspecting vendor ID...<br>> TRACE: hid_compare_usb_device(): match on vendor ID: 0x0483.<br>> TRACE: hid_compare_usb_device(): inspecting product ID...<br>> TRACE: hid_compare_usb_device(): match on product ID: 0x5057.<br>> TRACE: hid_compare_usb_device(): no custom matching function <br>> supplied.<br>> NOTICE: hid_find_usb_device(): found a matching USB device <br>> 005/002[0].<br>> TRACE: hid_force_open(): claiming USB device 005/002[0].<br>> NOTICE: hid_force_open(): successfully claimed USB device 005/002[0].<br>> TRACE: hid_init_parser(): initialising the HID parser for USB <br>> Device 005/002[0]...<br>> TRACE: hid_init_parser(): allocating space for HIDData structure...<br>> TRACE: hid_init_parser(): successfully allocated memory for <br>> HIDData strcture.<br>> TRACE: hid_init_parser(): allocating space for HIDParser <br>> structure...<br>> TRACE: hid_init_parser(): successfully allocated memory for <br>> HIDParser strcture.<br>> NOTICE: hid_init_parser(): successfully initialised the HID parser <br>> for USB Device 005/002[0].<br>> TRACE: hid_prepare_hid_descriptor(): initialising the HID <br>> descriptor for USB device 005/002[0]...<br>> TRACE: hid_prepare_hid_descriptor(): retrieving HID descriptor for <br>> USB device 005/002[0]...<br>> WARNING: hid_prepare_hid_descriptor(): failed to get HID descriptor <br>> for USB device 005/002[0]:error sending control message: Connection <br>> timed out<br>[...]<br><br>This is a different timeout.<br><br>> Any help is greatly appreciated. This device works on Windows with <br>> the vendor's software.<br><br>I suspected as much. I believe lsusb is retrieving the HID descriptors <br>from the end of the interface or configuration descriptor, but libhid <br>is using what should be an equally valid request to fetch /just/ the <br>HID descriptor.<br><br>Since the device is not behaving according to spec, you may have <br>better luck just operating it with the vendor's software, and using <br>usbsnoop2libusb[*] to construct a custom libusb-based driver.<br><br>[*] http://iki.fi/lindi/darcs/usbsnoop2libusb/usbsnoop2libusb.pl<br></div></body></html>