cancel
Showing results for 
Search instead for 
Did you mean: 

Composite HID host

BBert
Associate III

I have finally developed a working example of the HID host for the STM32H743. The current code works with either a keyboard or a mouse and was extracted from the STM32H743I-EVAL_USBH-FS example. It runs on a generic STM32H743 based development board by DevEBox. I now want to convert this example to a composite host. By that I mean an HID host that supports both a keyboard and mouse on the same USB port. At this point I know the composite device presents, in it's interface descriptor, two interfaces. One for the keyboard and one for the mouse. The current HID host code only supports interface 0.

My question is this: how do I modify this code to support both interfaces (i.e. become a composite host)? Any help will be appreciated.

9 REPLIES 9
Pavel A.
Evangelist III

Look for examples that handle composite devices on github.

With existing ST SUB host "middleware", you will have to modify the "core" host driver to detect a composite device and call your "class" driver.

Also you'll need to modify the HID "class" driver (which you already have done, likely) to handle both interfaces.

Note that some composite devices have more than two interfaces, the 3rd can be for example, function keys.

And one USB function can have multiple HID sub-devices via "top level collections".

For quality and robust HID support, better get a 3rd party USB package.

-- pa

Thanks for your reply Pavel 🙂

I have looked exhaustively on the web for examples relating to HID composite hosts only to find none. There are many examples for HID devices but none for composite hosts. I understand the basic idea of how a composite host must behave but I am looking for specifics as to what needs to be changed on the firmware I am using.

Bob

f888.1
Associate II

Dude, have you solved the problem yet? Can you send me the project for reference? My email is 418374540@qq.com

f888.1
Associate II

兄弟你这个问题解决了�?�?能�?�分解决的方法�?�?​

f888.1
Associate II

我邮箱是418374540@qq.com​

As I stated in my original post the project came from the STM32H743I-EVAL_USBH-FS HID Standalone example that can be downloaded from st.com.

Bob

I can't find it. Could you send one to my email address?

Bob,

So my memory is failing, I thought I've seen something on github. Apologies.

I've started a similar project couple of years ago, but abandoned it because the customer decided to use the Segger's library (good choice).

-- pa