Latest usbh.c changes "breaks" some devices
Operating System
Linux
Board
rp2040
Firmware
https://github.com/Cpasjuste/uGamePad
What happened ?
Hi,
In my (rp2040/rp2350) project, i did update tinyusb to be up to date. But since then, i have a device which is not working anymore in host mode. This is the "Neo Geo Mini USB-C Gamepad".
The problem comes from the addition of the "newly added" enumerations in usbh.c:
- ENUM_GET_STRING_LANGUAGE_ID
- ENUM_GET_STRING_MANUFACTURER
- ENUM_GET_STRING_PRODUCT
- ENUM_GET_STRING_SERIAL
In fact, the problem does not comes from tinyusb, but from the vendor i guess, since the queries just hang forever (no timeout). I'm not sure if tinyusb should handle this strings itself, maybe this should be handled by the user if needed ?
Else the root of the problem is probably, as mentioned in the code, the lack of timeout on tuh_control_xfer.
I have "fixed" (crappy fix) this on my side, but i'm not sure i'll have the time to make a proper fix.
I am not sure this should be labeled as a bug, maybe a discussion or/and todo, but I wanted to share this as there is probably other bugged devices around there.
Thanks, Cpasjuste
How to reproduce ?
Hard to reproduce without a crappy device descriptor like the NeoGeo Mini :)
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
No debug needed i guess !
Screenshots
No response
I have checked existing issues, dicussion and documentation
- [x] I confirm I have checked existing issues, dicussion and documentation.
Those are standard request, I dont see why it could cause the issue, can you get and post the debug log and the device info using pc such as lsusb -v here
Hi,
Yes I agree, this is strange. The device is a proprietary thing thought, maybe it's not "compliant".
I would need to buy a usb-c to usb-a otg cable someday (wanted to do that since a while), so for I now I will try to take a closer look on the pico in the next days and report back.
Thanks !
there is moe update, please pull and test again. let me know if it works for you