tinyusb icon indicating copy to clipboard operation
tinyusb copied to clipboard

Latest usbh.c changes "breaks" some devices

Open Cpasjuste opened this issue 9 months ago • 3 comments

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.

Cpasjuste avatar Mar 14 '25 15:03 Cpasjuste

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

hathach avatar Mar 19 '25 06:03 hathach

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 !

Cpasjuste avatar Mar 19 '25 21:03 Cpasjuste

there is moe update, please pull and test again. let me know if it works for you

hathach avatar May 21 '25 10:05 hathach