Hi
Windows manages the COM port number assignments, and a device's COM port number may change after a reboot.
To manually change the COM port number of a device:
- Open Windows Device Manager > right click the device > Properties
- Under Port tab > Advanced
- Change COM port number
Also, according to the experience before, the Windows assign the COM port according VID, PID and serial number.
So with the same device plug in, it should always get same COM port assignment.
But when two devices with same VID, PID and serial number might be treated as same device.
When you plug in them in sequence, Windows can assign different COM port for them.
However, after rebooting the Windows with the two USB devices attached, the COM port assignment should be decided by Windows for the two USB devices with same VID, PID and serial number.
-------------------------------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.