[libhid-discuss] error sending control message
Charles Lepple
clepple at ghz.cc
Sun Feb 1 13:59:27 UTC 2009
On Jan 31, 2009, at 1:24 AM, Brent Bushnell wrote:
> I'm new to USB HID programming and unsure whether I'm misunderstanding
> the device documentation or just going about this incorrectly.
>
> I have a touch screen that I've successfully run the python
> test_hidwrap.py against.
>
> After reviewing the HID class documentation and the device
> documentation
> (http://home.eeti.com.tw/web20/drivers/Software%20Programming%
> 20Guide_%20v1.5.pdf
> ),
>
> I'm fairly certain I should be sending a diagnostics packet using
> set_output_report.
>
> The trouble is that every path I try results in a broken pipe error.
>
> I've gathered that the path values ending in 0x00000000 are not
> complete paths
> and possibly additional bytes for neighboring paths?
Yes, but one curious thing is that the first entry usually does not
end in 0x00000000.
> WARNING: hid_find_object(): can't find requested item
> 0x00010001.0x00010001.0x00010030 of USB device 001/010[0].
Also, note that while the requested path was not listed in the
hid_dump_tree output, all of the hid_dump_tree elements are 0x80
(input). I realize the diagnostics don't reflect this, but libhid is
unable to find your listed path *as an output* (since you called
hid_set_output_report).
As far as libhid is concerned, I believe that there are no possible
control messages that you could get it to send, since it only sees
input reports in the descriptor.
Unfortunately, HID devices are allowed to "publish their API" but
nothing prevents them from only returning a subset of their available
input/output/feature reports. Your best bet at this point is to look
at some USB packets captured with usbsnoop, or similar programs.
--
Charles Lepple
More information about the libhid-discuss
mailing list