Skip to main content
Dimitar Dyakov
Associate III
November 3, 2021
Question

Drivers for HID+CDC USB composite device (Windows 10)

  • November 3, 2021
  • 3 replies
  • 2049 views

Hi every one.

I have made a HID + CDC USB composite device. Windows recognizes it and I can control the volume and I have a COM port.

HID is interface 0 and the CDC is interface 2 if this is of any significance.

I can open the COM port with Tera Term and all works wonderfully, but when I try to open the port using python it breaks.

Python gives the following error:

Cannot configure port, something went wrong. Original message: OSError(22, 'The parameter is incorrect.', None, 87)

If I make only CDC device my python code works just fine.

Since I am not that good with USB what would be the next step? What info can i get for you guys.

Cheers!

3 replies

TDK
Super User
November 3, 2021

The next step would be to understand why Python is throwing that error message and figure out which parameter is incorrect.

The drivers for HID and CDC are built into windows, even when you're using a composite USB device.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Pavel A.
Super User
November 3, 2021

Not checking the USB function index of control requests?

Visitor II
December 12, 2023

Hi Dimitar Dyakov,

Can you please share the code/project? Or guideme on how to set usb composite on STM32F4 or STM32F1 please?

Thanks!

Dimitar Dyakov
Associate III
December 30, 2023

you can find all the code here https://github.com/MitkoDyakov/Roendi 

 

If you have questions you can post an issue, cheers