But when I plug it into my Feather RP2040 with USB Host (without the arcade stick) it connects and works
when I connect the arcade stick the RP2040 nothing seems to work, I get an error “NotAllowedError: Failed to write the feature report.” when trying to monitor and none of the arcade stick to keyboard mappings do anything.
I didn’t see anything in the video about “report descriptor” but I have the wireshark capture (as per the video I did not have hid remapper plugged in, this is just the straight arcade stick)
let me know if you want this uploaded somewhere else.
So the device is doing something weird. The first time it’s asked for the report descriptor it just returns a single zero (buffer length=1). And it does this for every interface so it’s not a one time fluke.
Your PC then retries and gets the actual descriptor. HID Remapper doesn’t (or rather TinyUSB, the library we use, doesn’t) so it never gets the proper descriptor.
If that was all we’d just get the empty descriptor and the device just wouldn’t work. I think what happens is TinyUSB gives us a buffer with the single zero but says there’s as many bytes in the buffer as there should be (as many as the actual report descriptor has) and we end up trying to parse some garbage memory (previous contents of the buffer) and end up in some weird state. (This by itself would mean that our descriptor parser is not as robust as it should be but that’s a separate issue.)
Of course we can only guess what Windows does by what we see, but it seems Linux does retry as well. So it’s possible your device is not the only one that behaves like this. Perhaps we (TinyUSB) should retry as well. At the very least it should zero the rest of the buffer before returning it.