cancel
Showing results for 
Search instead for 
Did you mean: 

USB host doesn't support hubs but some dual function keyboards work - how?

PMath.4
Senior III

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?

4 REPLIES 4

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

PMath.4
Senior III

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

0693W000003BpI0QAK.png

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

Pavel A.
Evangelist III

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