cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB CDC: How to Customize COM Port Friendly Name on Windows Without INF File?

luisfynn1
Associate III

Hello,

I am working on an STM32 USB CDC (Virtual COM Port) device using the STM32 USB Device Library (CubeMX-generated project).

My goal is to have the device appear on Windows as a custom COM port name such as:

MO3 Device (COMx)

However, I want to achieve this without using a custom INF file, since distributing and installing drivers on every PC is not practical for my use case.

From my current understanding:

  • The Product String (iProduct) in usbd_desc.c can be modified
  • The Interface String (iInterface) in the CDC descriptor may also influence the displayed name
  • Windows typically uses usbser.sys and assigns "USB Serial Device (COMx)" by default
  • Friendly Name seems to be controlled primarily via INF, not firmware

I have a few specific questions:

  1. Is there any reliable way to influence or override the COM port Friendly Name purely from STM32 firmware (USB descriptors), without an INF file?
  2. Does modifying iInterface (or using IAD / composite device descriptors) improve the likelihood of Windows using a custom name?
  3. Are there known descriptor configurations that consistently result in Windows displaying the Product String as the COM port name?
  4. Is this behavior dependent on specific Windows versions (e.g., Windows 10 vs 11)?

If complete control is not possible without INF, I would like to understand the exact limitations imposed by usbser.sys and Windows PnP behavior.

Any insights, practical workarounds, or reference implementations would be greatly appreciated.

Thank you.

1 REPLY 1
FBL
ST Employee

Hi @luisfynn1 

Device naming is controlled by the host OS, driver binding, and its registry properties, not by the USB device alone. It can be changed. The behavior may vary across Windows versions, updates, and driver cache state.

From the device side, you can configure naming in product string descriptor as shown in this example.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.




Best regards,
FBL