[libhid-discuss] Input and Output ports
Charles Lepple
clepple at ghz.cc
Thu Sep 13 03:27:40 UTC 2007
On Sep 12, 2007, at 7:01 PM, ankita prasad wrote:
> Thanks for all your help till now. The firmware on the HID device
> does not
> have the correct report descriptor. But the guys who made teh
> firmware sent
> me what the report descriptor should contain.
Maybe we should have a cleaner way to pass in a replacement
descriptor. I'll keep that in mind.
> So I hard coded it in the
> parser functions and now I can read and write to my HID device. The
> input
> and the output ports are the same being 0x81.
If by "ports" you mean endpoints, then something is wrong - bit 7
(0x80) of the endpoint determines whether the lower 4 bits describe
an input endpoint (0x80) or an output endpoint (0). So 0x81 is
EP1_IN, which can't be an output endpoint.
You can still send AND receive reports on EP0 (the control endpoint),
via control transfers. But that's separate from interrupt endpoints.
If you are not receiving any errors from writing to EP1_IN, then that
is probably due to a lower layer than libhid (check the code - there
is not much between hid_interrupt_write and the libusb calls).
--
Charles Lepple
More information about the libhid-discuss
mailing list