<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" &lt;clepple@ghz.cc&gt;<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>&gt; Hello,<br>&gt;<br>&gt; I'm getting a timeout getting the HID Descriptor from a third party &nbsp;<br>&gt; device. Here is the lsusb -vvv output:<br>&gt;<br>&gt; Bus 005 Device 002: ID 0483:5057 SGS Thomson Microelectronics<br>[...]<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Report Descriptor: (length is 34)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Usage Page, data= [ 0xa0 0xff ] 65440<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (null)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Local ): Usage, data= [ 0xa5 ] 165<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (null)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Main &nbsp;): Collection, data= [ 0x01 ] 1<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Application<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Local ): Usage, data= [ 0xa6 ] 166<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (null)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Local ): Usage, data= [ 0xa7 ] 167<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (null)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Logical Minimum, data= [ 0x80 ] 128<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Logical Maximum, data= [ 0x7f ] 127<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Report Size, data= [ 0x08 ] 8<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Report Count, data= [ 0x3c ] 60<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Item(Main &nbsp;): Input, data= [ 0x02 ] 2<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Data Variable Absolute No_Wrap Linear<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Preferred_State No_Null_Position &nbsp;<br>&gt; Non_Volatile Bitfield<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Local ): Usage, data= [ 0xa9 ] 169<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (null)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Logical Minimum, data= [ 0x80 ] 128<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Logical Maximum, data= [ 0x7f ] 127<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Report Size, data= [ 0x08 ] 8<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Global): Report Count, data= [ 0x3c ] 60<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Main &nbsp;): Output, data= [ 0x02 ] 2<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Data Variable Absolute No_Wrap Linear<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Preferred_State No_Null_Position &nbsp;<br>&gt; Non_Volatile Bitfield<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item(Main &nbsp;): End Collection, data=none<br>[...]<br>&gt; can't get debug descriptor: Connection timed out<br>&gt; cannot read device status, Connection timed out (110)<br><br>Despite the timeout messages, lsusb got the HID report descriptor.<br><br>&gt; Note the timeouts at the end. And here is the output of the HID test &nbsp;<br>&gt; program, modified to match this device:<br>&gt;<br>&gt; &nbsp; TRACE: hid_find_usb_device(): inspecting USB device 005/002[0]...<br>&gt; &nbsp; TRACE: hid_compare_usb_device(): comparing match specifications to &nbsp;<br>&gt; USB device...<br>&gt; &nbsp; TRACE: hid_compare_usb_device(): inspecting vendor ID...<br>&gt; &nbsp; TRACE: hid_compare_usb_device(): match on vendor ID: 0x0483.<br>&gt; &nbsp; TRACE: hid_compare_usb_device(): inspecting product ID...<br>&gt; &nbsp; TRACE: hid_compare_usb_device(): match on product ID: 0x5057.<br>&gt; &nbsp; TRACE: hid_compare_usb_device(): no custom matching function &nbsp;<br>&gt; supplied.<br>&gt; &nbsp;NOTICE: hid_find_usb_device(): found a matching USB device &nbsp;<br>&gt; 005/002[0].<br>&gt; &nbsp; TRACE: hid_force_open(): claiming USB device 005/002[0].<br>&gt; &nbsp;NOTICE: hid_force_open(): successfully claimed USB device 005/002[0].<br>&gt; &nbsp; TRACE: hid_init_parser(): initialising the HID parser for USB &nbsp;<br>&gt; Device 005/002[0]...<br>&gt; &nbsp; TRACE: hid_init_parser(): allocating space for HIDData structure...<br>&gt; &nbsp; TRACE: hid_init_parser(): successfully allocated memory for &nbsp;<br>&gt; HIDData strcture.<br>&gt; &nbsp; TRACE: hid_init_parser(): allocating space for HIDParser &nbsp;<br>&gt; structure...<br>&gt; &nbsp; TRACE: hid_init_parser(): successfully allocated memory for &nbsp;<br>&gt; HIDParser strcture.<br>&gt; &nbsp;NOTICE: hid_init_parser(): successfully initialised the HID parser &nbsp;<br>&gt; for USB Device 005/002[0].<br>&gt; &nbsp; TRACE: hid_prepare_hid_descriptor(): initialising the HID &nbsp;<br>&gt; descriptor for USB device 005/002[0]...<br>&gt; &nbsp; TRACE: hid_prepare_hid_descriptor(): retrieving HID descriptor for &nbsp;<br>&gt; USB device 005/002[0]...<br>&gt; WARNING: hid_prepare_hid_descriptor(): failed to get HID descriptor &nbsp;<br>&gt; for USB device 005/002[0]:error sending control message: Connection &nbsp;<br>&gt; timed out<br>[...]<br><br>This is a different timeout.<br><br>&gt; Any help is greatly appreciated. This device works on Windows with &nbsp;<br>&gt; the vendor's software.<br><br>I suspected as much. I believe lsusb is retrieving the HID descriptors &nbsp;<br>from the end of the interface or configuration descriptor, but libhid &nbsp;<br>is using what should be an equally valid request to fetch /just/ the &nbsp;<br>HID descriptor.<br><br>Since the device is not behaving according to spec, you may have &nbsp;<br>better luck just operating it with the vendor's software, and using &nbsp;<br>usbsnoop2libusb[*] to construct a custom libusb-based driver.<br><br>[*] http://iki.fi/lindi/darcs/usbsnoop2libusb/usbsnoop2libusb.pl<br></div></body></html>