09.Jan.2023
COM port (Communication port) is the name for the port serial interface that can be found in a common computer(IBM compatible). Sometimes computers come with one or two physical COM ports (RS-232), while today’s models don’t have them ususally. However, the COM port does not necessarily refer to physical ports, but also virtual. Such ports are created when using USB-to-UART adapter, most notably used by FTDI and Croduino. Here are a few examples of such devices: USB modems, cell phones, RFID readers, card readers, and so on.
Every time Windows register such a device with a new ID, it gives that device a new COM port (COM2, COM3, COM4, etc.). Even when you turn off the device, the COM port that is assigned to the device remains reserved for it. That is, each time you reconnect they will be assigned to the same COM port. Generally it’s great. The problem can occur if some software that comes into your device is set so that it can access only, say, the first five COM ports. However, this tutorial will describe how to “clean” COM ports that are in use, and how to disable numbering of new ports.
HOW TO RESET COM PORTS?
1. ClickStart –writeregeditthen click Enter.
2. Navigate through folders:HKEY_LOCAL_MACHINE\SYSTEM\CurrentConstrolSet\Control\COM Name Arbiter
3. Double-click right clickComDBon right panel
4. This will open a window with addresses ports. To reset, enter all zeros, as shown below:
Once you confirm the changes by clicking onOK, our ports are reset. We can also check:
1. ClickStart –writedevmgmt.mscor simplyDevice manager, then click Enter.
2. From the middle pane, expandPorts (COM & LPT), right-click on any of the available ports andProperties
3. ChoosePort Settingsand clickAdvanced
4. Click on the drop down menuCOM Port Number, and we see that all COM ports available.
Check those ports after Windows assignes them a COM port, there should be written “in-use“.
As the title says, follow the instructions to disable the Windows computer from getting the new COM port number each time a new USB-to-UART device is connected.
1. ClickStart –writeregeditthen click Enter.
2. Navigate through folders:HKEY_LOCAL_MACHINE\SYSTEM\CurrentConstrolSet\Control\usbflags
3. Right click on folderusbflags, zatimNew – Binary Value
4. Name the new file asIgnoreHWSerNum04036001.
5. Repeat step 3., and name new file asIgnoreHWSerNum04036010. Now in the right panel you can see:
6. It is necessary to change the value of both files. For each individual double click and enter the value of01:
For more information about the advanced settings of virtual COM look here in the official FTDI document