Skip to main content
HAlzo
Associate III
August 30, 2019
Question

How to set USB device serial number.

  • August 30, 2019
  • 1 reply
  • 1075 views

Hello,

I am using STM32H as a FS USB device, my desktop application check for Device ID and Product ID to connect to the device as VCOM port.

the problem is that when connecting different devices to PC "one after the other", each new device is assigned a new VComPort by windows.

I need to have fixed VcomPort, for all my developed devices having the same VID and PID.

IS it possible to assign the same USBD serial number to my device by writing to DEVICE_ID1, DEVICE_ID2 and DEVICE_ID3 in usbd_desc.c?

Best Regards

Hossam Alzomor

This topic has been closed for replies.

1 reply

Pavel A.
August 30, 2019

Yes, sure. Just keep in mind that Windows expects these "serial numbers" to be unique. If you connect two these devices with same serial to a PC, Windows won't like it.

-- pa