Skip to main content
BBert
Associate III
July 20, 2020
Question

Composite HID host

  • July 20, 2020
  • 9 replies
  • 2329 views

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.

This topic has been closed for replies.

9 replies

Pavel A.
July 20, 2020

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

BBert
BBertAuthor
Associate III
July 20, 2020

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

Pavel A.
July 24, 2020

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

f888.1
Associate
July 23, 2020

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

BBert
BBertAuthor
Associate III
July 23, 2020

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

f888.1
Associate
July 24, 2020

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

f888.1
Associate
July 23, 2020

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

f888.1
Associate
July 23, 2020

我邮箱是418374540@qq.com​