2020-07-30 07:41 AM
We are still waiting for USB Host Hub support (will it ever arrive?) but in the mean time I'm trying to understand how some keyboards with built in touchpads work but others don't. Obviously, if they have a built-in hub and the keboard always connects through the hub they don't work but some, despite having a touchpad or joystick, seem to work. Can any one explain how this happens?
2020-07-30 11:09 AM
You simply can have several interfaces within one device. See for example appendix E of the HID standard, it gives a keyboard/mouse combo's descriptors.
JW
2020-07-31 03:49 AM
Can you give me a link to the version you reference please. The version I've found https://www.usb.org/sites/default/files/hid1_11.pdf doesn't mention a combo descriptor
2020-07-31 04:22 AM
As that text says, this combination can be pulled out entirely within one interface, too; but then the driver would need to be written properly to handle HID completely, not just boot protocol - and that's far from being trivial.
Presuming you've just slapped on what came with Cube/CubeMX, there's quite some chance standard keyboards wouldn't work either.
What do you mean by "combo descriptor"?
JW
2020-07-31 03:43 PM
There's a hub driver example somewhere on github, but it has been left incomplete.
Get a decent USB library, such as Segger's. It supports hubs for STM32F7, H7 and other lines which do not have related errata.
> in the mean time I'm trying to understand how some keyboards with built in touchpads work but others don't.
Show the descriptors. As Jan wrote, it can be done in several ways; modern OS like Linux and Mac support everything. For a poor host such as bare metal STM32, roll your own code.
-- pa