A fork/continuation of the original since the author has been away for a while. Supports kernels up to 6.15 with lots of other changes.
A fork/continuation of the original since the author has been away for a while. Supports kernels up to 6.15 with lots of other changes.
https://github.com/abcminiuser/lufa
Literally a kid did this in high school, this is without hardware support, just GPIO, but he also implemented the full stack on avrusbs and cortex-ms, and one thing he emulated was multiple devices on a hub.
Well, yeah, obviously it can be done. What’s the latency, though? A hub’s muxing alternates between packets from different devices, but even USB 1.1 has 64B packets, leaving 64b per controller if you report them all in one packet. That’s 15 digital buttons, 6b per axis, and 13b left over for routing.
However, I can’t think of a way to get the computer to decode one 64B packet into eight separate HID polls without a custom driver. If you use a hub, you’re limited to 8kHz total by the spec, but many EHCI controllers limit that to 1kHz. 125Hz per player is not great.
I can’t confirm that this is the reason or that there isn’t a different way around the restriction, but it seems likely from what I know of USB hubs.
TL;DR: with a custom driver, you can report all controllers on all USB polls rather than each taking up a whole interval, giving you 8x the polling rate compared to an emulated hub with 8 standard HIDs.
Firstly, it’s not a real hub, it’s an emulated hub, and you can do that emulating everything as USB 2.0.
Secondly you can have multiple hid interface endpoints on a single device.
Thirdly, you wouldn’t be polling, these would be hid interrupt urbs, and you can storm them 1 per micropacket if you want, they just show up in the ehci buffers.
Finally, no human is overflowing the hid interface like this, not even 8 of them.