cancel
Showing results for 
Search instead for 
Did you mean: 

Is normal CDC like communication possible when using HID?

Broman3100
Associate III

Hey all,

I would like to make a HID device which would have output options configured by computer, I thought I would use same USB to feed the config to STM, But I cant seem to find a clear answer if it is even possible to send data to USB HID, like you do with CDC.

If anyone has clear answer or can point me towards documentation/example for that, I'd appreciate it.

1 ACCEPTED SOLUTION

Accepted Solutions
Lubos KOUDELKA
ST Employee

Here seems to be the easiest option composite device - first class will be your HID keyboard, second class would serve for switching keyboard modes from host device, could be custom HID as well.

View solution in original post

4 REPLIES 4
Lubos KOUDELKA
ST Employee

Hi,

you may check following guidance

https://www.youtube.com/watch?v=3JGRt3BFYrM&list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa&index=16

But honestly right now I don't see any significant advantage compared to CDC. Could you please share why you want to prefer HID over CDC?

HID devices are easier to recognize (vs. multiple COM ports) by software.

The modern Windows has .net API to help with this.

Broman3100
Associate III

Hey Lubos, Thanks for your answer, I want to use HID because I want my device to act as a keyboard when connected to pc. As far as I know, HID is the only way to do it (?).

Lubos KOUDELKA
ST Employee

Here seems to be the easiest option composite device - first class will be your HID keyboard, second class would serve for switching keyboard modes from host device, could be custom HID as well.