[libhid-discuss] Report Description Question (Not Matching lsusb)

Christopher Moore christopher at bnmintl.com
Fri Oct 3 11:19:12 UTC 2008


the test_libhid.c (after updating it to point to my device), also 
returns the same thing:

NOTICE: hid_prepare_report_descriptor(): successfully initialised report 
descriptor for USB device 002/002[3].      
  TRACE: hid_prepare_parser(): setting up the HID parser for USB device 
002/002[3]...                                
  TRACE: hid_reset_parser(): resetting the HID parser for USB device 
002/002[3]...                                   
  TRACE: hid_prepare_parser(): dumping the raw report 
descriptor                                                     
  TRACE: hid_prepare_parser(): 0x000: 
0x05                                                                            

  TRACE: hid_prepare_parser(): parsing the HID tree of USB device 
002/002[3]...                                      
 NOTICE: hid_prepare_parser(): successfully set up the HID parser for 
USB device 002/002[3].                         
 NOTICE: hid_force_open(): successfully opened USB device 
002/002[3].                                                
device identification of HIDInterface 
002/002[3]:                                                                     

  dev_handle:    
0x09adb4a8                                                                                           

  device:        
0x09ae21b8                                                                                           

  location:      002/002
  manufacturer:  LINKSYS
  product:       Linksys CIT200
  serial number: USBGAP0000000000000000000016617407E
  TRACE: hid_reset_parser(): resetting the HID parser for USB device 
002/002[3]...
  TRACE: hid_dump_tree(): iterating the parse tree for USB device 
002/002[3]...
parse tree of HIDInterface 002/002[3]:
  TRACE: hid_reset_parser(): resetting the HID parser for USB device 
002/002[3]...
  TRACE: hid_close(): closing USB device 002/002[3]...


I ran that command as root.  Meanwhile, running 'lsusb -d 13b1:001d 
-vvv' returns the whole report.

Does this mean that libhid doesn't like my device and I should stick 
with libusb?

Thanks

Christopher





Charles Lepple wrote:
> On Oct 2, 2008, at 8:36 PM, Christopher Moore wrote:
>
>> Hello,
>>
>> I'm trying to get some output from hid_dump_tree and I can't seem to get
>> anything meaningful out of it.  For example, in one of the older posts
>> on this mailing list, I managed to see output like the following:
>>
>> TRACE: hid_dump_tree(): iterating the parse tree for USB device 
>> 001/003[0]...
>> parse tree of HIDInterface 001/003[0]:
>>   path: 0x00010009.0x00010033; type: 0x80
>>   path: 0x00010009.0x00010034; type: 0x80
>> ...
>>
>> while, I can only recieve this:
>>
>> TRACE: hid_reset_parser(): resetting the HID parser for USB device 
>> 002/005[3]...
>>   TRACE: hid_prepare_parser(): dumping the raw report descriptor
>>   TRACE: hid_prepare_parser(): 0x000: 0x05
>
> Please try the C test_libhid.c program first - the Python interface is 
> newer, and may have hidden bugs.
>
>> -------------------
>>
>> the code being used (Python):
>>
>> hid_set_debug(HID_DEBUG_ALL)
>> hid_set_debug_stream(sys.stderr)
>> hid_set_usb_debug(0)
>>
>> ret = hid_init()
>> if ret != HID_RET_SUCCESS:
>>   sys.stderr.write("hid_init failed with return code %d.\n" % ret)
>>
>> hid = hid_new_HIDInterface()
>> matcher = HIDInterfaceMatcher()
>> matcher.vendor_id = 0x13b1
>> matcher.product_id = 0x001d
>>
>> ret = hid_force_open(hid, 3, matcher, 3)
>> ret = hid_dump_tree(sys.stdout, hid);
>>
>> ---------------------
>>
>> I'm after Interface #3 (the hid device).
>
>
> I would also take a look at the hidwrap.py high-level wrapper around 
> the SWIG-generated code. The hidwrap.py interface is more 
> object-oriented, and hides some of the C heritage of the code.
>




More information about the libhid-discuss mailing list