Forum Discussion
AleB_883
Sep 12, 2023Copper Contributor
I need to force an USB port to only work on the same COM port (production line test)
Hello! I posted this question on answer.microsoft.com but they redirected me here since it's not a home user issue: We have to test a (very) large number of devices by connecting them to a PC (Wi...
Deleted
Sep 15, 2023Bing AI says this:
:Yes, there is a way to force a COM port number on a fixed USB port. Here are the steps you can follow:
Open Windows Device Manager.
Right-click on the device and select Properties.
Under the Port Settings tab, click on Advanced.
Change the COM port number to your desired number1.
If the cable is connected to the same USB port, it should get the same COM number1. This way, every time a new device is connected, it won’t create a new COM port, and you won’t have to reconfigure the serial port and baud rate each time2.
As for your concern about reaching COM256, Windows should handle this automatically and assign available COM ports as needed2. However, it’s always a good practice to monitor this to ensure there are no issues.
Please note that these changes should not create issues elsewhere if the PC is only used for that test line2. I hope this helps! Let me know if you have any other questions.
En savoir plus :
1. learn.microsoft.com
2. stackoverflow.com
3. bing.com
4. superuser.com
5. techcommunity.microsoft.com
6. kb.plugable.com
7. community.spiceworks.com
8. learn.microsoft.com
+5 plus
:Yes, there is a way to force a COM port number on a fixed USB port. Here are the steps you can follow:
Open Windows Device Manager.
Right-click on the device and select Properties.
Under the Port Settings tab, click on Advanced.
Change the COM port number to your desired number1.
If the cable is connected to the same USB port, it should get the same COM number1. This way, every time a new device is connected, it won’t create a new COM port, and you won’t have to reconfigure the serial port and baud rate each time2.
As for your concern about reaching COM256, Windows should handle this automatically and assign available COM ports as needed2. However, it’s always a good practice to monitor this to ensure there are no issues.
Please note that these changes should not create issues elsewhere if the PC is only used for that test line2. I hope this helps! Let me know if you have any other questions.
En savoir plus :
1. learn.microsoft.com
2. stackoverflow.com
3. bing.com
4. superuser.com
5. techcommunity.microsoft.com
6. kb.plugable.com
7. community.spiceworks.com
8. learn.microsoft.com
+5 plus
powaycraig
Jun 14, 2024Copper Contributor
This absolutely doesnt work I am still in search of the solution.
- AleB_883Jun 17, 2024Copper Contributor
I found out the solution, you have to add a registry binary key to make the PC ignore serial numbers of the device. This means that for a device with the same VID and PID (same manufacturer and product) the unique serial numbers will be ignored and the same com port will be used.
Add a BINARY_KEY called like this and set it to 1:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\IgnoreHWSerNum{Device VID + Device PID}
Example for a FTDI device:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\IgnoreHWSerNum04036001