HID host: DeviceUsesOutPipe is never set

23 views
Skip to first unread message

Wolfgang Schnerring

unread,
Sep 6, 2017, 4:53:32 AM9/6/17
to LUFA Library Support List
Hello,

the USB_ClassInfo_HID_Host_t has a flag "DeviceUsesOutPipe", but I noticed that it is not set to true, even though the "DataOutPipe" contains an entry (after connecting my device, a PS4 joypad). This leads to HID_Host_SendReportByID not working properly, since it observes the flag. I then grepped over the LUFA source code and found only exactly these two occurrences of the flag, its declaration and the check in SendReport.
So... shouldn't this flag be populated at some point? As a workaround I'm setting the flag now in the DeviceEnumerationComplete event handler, but it feels to me that LUFA should do this... am I missing something?

Thanks for your help,
Wolfgang

Dean Camera

unread,
Sep 10, 2017, 7:03:52 AM9/10/17
to lufa-s...@googlegroups.com

Hrm, I haven't touched that code for ages, ever since the AT90USB647 went EOL, and interest in using LUFA as a host died out due to lack of cheap and readily available hardware become scarce.


Looking back over the HID driver, that's a bug. The flag is supposed to be set inside HID_Host_ConfigurePipes() when the OUT data pipe is detected, so that sending reports knows whether it should direct the report data to the control endpoint (via a HID class request) or a dedicated OUT endpoint. I've patched the repo in https://github.com/abcminiuser/lufa/commit/544c4dc9e18d56768be11dd16e3cad693e7cff46 for the next release.


Thanks for the report!

- Dean

--
You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lufa-support...@googlegroups.com.
To post to this group, send email to lufa-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/lufa-support.
For more options, visit https://groups.google.com/d/optout.

Wolfgang Schnerring

unread,
Sep 11, 2017, 1:08:40 AM9/11/17
to LUFA Library Support List
Thanks for the prompt response and fix!
Wolfgang
Reply all
Reply to author
Forward
0 new messages