Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

General discussion • Re: please help me create more than 7 usb hid gadgets!

$
0
0
Aww crap, sorry for skipping such an important detail! I'm using a raspberry pi 4b, which I think is the bcm2711.

It is, but on further reflection, the USB controller used for gadgets is the same as on earlier models so has the same limitations. Sorry about missing that above.
Looking at https://github.com/benadler/keystick/bl ... icehid.cpp, do you think I could try to work around this by creating multiple gadgets? Not sure this can be done on the same DEFAULT_UDC?

Or am I maybe running into a limited number of endpoints? If every joystick needed e.g. 3 endpoints, and I can only create 7 USB functions, maybe there's a limit between 22 and 24 endpoints?

Sorry but I have no idea.
But you don't necessarily need to create a new HID device for each joystick. HID devices can have multiple reports so maybe try that.
Right now it seems I have a 1:1 mapping between a /dev/hidgX and a joystick appearing in windows. If you look at my report in the same devicehid.cpp, are you advising to try just duplicating the

Code:

0xA1, 0x01, // Collection (Application)
section, and hoping windows will create a joystick for every section?

Again, sorry but I have no idea. That's also a question for windows experts. You might like to search the web for USB HID composite gadgets.

Statistics: Posted by thagrol — Mon Jan 20, 2025 8:30 pm



Viewing all articles
Browse latest Browse all 8374

Trending Articles