Note that there are some explanatory texts on larger screens.

plurals
  1. PODetermining the HID Path for USB HID device using libhid on Linux
    text
    copied!<p>I’m interested in using libhid to access a custom HID device that we are developing on a PIC microcontroller. I have been able to successfully get the test_libhid code to run. The instructions for reading and writing to devices using this library are provided as comments in the test_libhid code.</p> <p>I have attempted to follow the documented techniques for reading and writing, but so far, I have not been to successfully read or write to the device. I suspect the reason may be that the report descriptor for the device specifies a 64 byte array for both the input and output data reports.</p> <p>I have read the details contained in the Device Class Definition for HID section from usb.org, and I think that I understand how descriptors work in general and how they translate to HID paths, but my attempts to read and write data to the device have failed. </p> <p>I have verified that the device works in Windows, so my problem appears to lie on the Linux side. I don’t think that it should matter, but I should note that I’m currently working in a VMWare virtual machine, loaded with Ubuntu 8.04 server</p> <p>Can anyone provide some guidance on how to specify he HID path for the following report descriptor (generated from lsusb –vvv):</p> <pre><code>Report Descriptor: (length is 29) Item(Global): Usage Page, data= [ 0x00 0xff ] 65280 (null) Item(Local ): Usage, data= [ 0x01 ] 1 (null) Item(Main ): Collection, data= [ 0x01 ] 1 Application Item(Local ): Usage Minimum, data= [ 0x01 ] 1 (null) Item(Local ): Usage Maximum, data= [ 0x40 ] 64 (null) Item(Global): Logical Minimum, data= [ 0x00 ] 0 Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Report Count, data= [ 0x40 ] 64 Item(Main ): Input, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Local ): Usage Minimum, data= [ 0x01 ] 1 (null) Item(Local ): Usage Maximum, data= [ 0x40 ] 64 (null) Item(Main ): Output, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Main ): End Collection, data=none </code></pre> <p>Also, when I run the test_libhid program, it dumps the parse tree as 64 identical entries that look like this:</p> <pre><code>path: 0xff000001.0x00000000; type: 0x80 </code></pre> <p>These are presumably the inputs. This list is followed by another 64 entries that look like this:</p> <pre><code>path: 0xff000001.0x00000000; type: 0x90 </code></pre> <p>I have posted to the libhid mailing list, but there has not been much activity there recently, so I thought that I would bring my question here. If anyone can provide guidance on how the HID path for this input and output report should be specified, it would be a tremendous help.</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload