[libhid-discuss] Not sure what to do next

Charles Lepple clepple at ghz.cc
Fri Mar 14 22:14:40 UTC 2008


On Mar 14, 2008, at 12:38 AM, alfredo alvarez wrote:
[...]
>   path: 0x00010002.0x00010001.0x00000000; type: 0x80
>   path: 0x00010002.0x00010001.0x00000000; type: 0x80
>   path: 0x00010002.0x00010001.0x00000000; type: 0x80
>   path: 0x00010002.0x00010001.0x00000000; type: 0x80
>   path: 0x00010002.0x00010001.0x00010030; type: 0x80
>   path: 0x00010002.0x00010001.0x00010031; type: 0x80
>   path: 0x00010002.0x00010001.0x00010038; type: 0x80


These all look like inputs, so I think you will only be able to get  
reports from the device.

(Technically, a control transfer can read and write, since you are  
sending bytes to the device in order to tell it what to return, but  
in HID terms, 0x80 is an input.)

The hidparser code seems to be choking on the button definitions. On  
the other hand, you should be able to retrieve the X, Y and Z axes if  
you use any of the following paths:

{ 0x00010002, 0x00010001, 0x00010030 }
{ 0x00010002, 0x00010001, 0x00010031 }
{ 0x00010002, 0x00010001, 0x00010038 }

Requesting 4 bytes sounds right.

Another way to do this is to use the hid_set_idle function and read  
from the interrupt endpoint. The hid_get_input_report function  
requires a path to see which report ID it needs to retrieve, but you  
are asking for the whole report anyway, and there are no report IDs  
defined in the mouse HID report descriptor.

-- 
Charles Lepple





More information about the libhid-discuss mailing list