cancel
Showing results for 
Search instead for 
Did you mean: 

How to set USB device serial number.

HAlzo
Senior

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

1 REPLY 1
Pavel A.
Evangelist III

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