How To Change Com Port Number Windows 7
When y'all connect a new COM device or a USB device to your computer (USB modem, mobile phone, Bluetooth adapter, serial to USB converters, etc.), Windows detects it using Plug-northward-Play and assigns it a COM port number in the range of 1 to 255 (COM1, COM2, COM3, etc.). If this device is connected again, the reserved COM (Communication
, or Series
) port number is assigned to it. A new device gets the first free COM port number. Information technology often happens that when connected, external devices create several COM ports at once. In my case after connecting a Bluetooth adapter ten!!! new COM ports have appeared in the arrangement.
A number of legacy applications are able to address only two-digit COM port numbers, and won't work with COM100 and higher. In the worst cases, these programs piece of work only with COM1-COM9 ports. What if a device has got a college COM port number? Is information technology possible to reset the numbering for reserved COM ports and delete assigned ports?
Contents:
- How to Change a COM Port Number for a Device in Windows?
- Detect Out Which Procedure is Using a Serial COM Port in Windows
- Resetting COM Port Numbers in Windows Registry
How to Change a COM Port Number for a Device in Windows?
In Windows, you lot can manually change the COM port number assigned to a device. Suppose the necessary COM port is already decorated, and you want to endeavor to free it.
- Open up the Device Manager past running the
devmgmt.msc
command; - Select View->Prove Hidden Devices in the bill of fare;
- Then aggrandize Ports (COM & LPT) and observe your device in the list;
- Go to the Port Settings tab and click the Advanced button;
- The current COM port number assigned to the device can be found in the COM Port Number field;
- To change it, open up the driblet-downward list and select the COM port number you desire to set.
But more often yous cannot change the assigned COM port number to some other ane in the hardware properties, since all the "lower" COM ports are already in use.In this example, y'all need to try to remove the COM port reservation
- Aggrandize the Ports (COM & LPT) branch, observe which COM port number yous need is assigned to (a pale icon means that this COM port is assigned, but this device is not currently connected);
- Right-click it and select Uninstall ;
- Now you tin can assign the freed COM port to some other device. Once once again open up the properties of your device, go to the Port Settings -> Advanced tab. And so go to the Port Settings tab and click Advanced. Select the costless COM port in the dropdown list.
However, this method does not allow you to free the busy COM port in all cases.
Yous can get the full list of busy COM ports on Windows using PowerShell:
Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description
You can get the COM port number for a specific device by its name, for case:
Get-WMIObject Win32_SerialPort | Where-Object { $_.Proper noun -like "*Arduino*"}|select name, deviceid
or
Get-WMIObject Win32_SerialPort | Where-Object { $_.Name -similar "*GPS*"}|select name, deviceid
Detect Out Which Process is Using a Series COM Port in Windows
You won't be able to release the COM port of a device that is used past Windows or a running program (process). First, you demand to stop the process that is currently using the COM port. You can use the Procedure Explorer tool (by Sysinternals) to find out the name of the process using a particular COM port number (https://docs.microsoft.com/en-gb/sysinternals/downloads/process-explorer).
First, you need to brandish the name of the service that uses the COM port. Run the PowerShell control:
get-pnpdevice -class Ports -ea 0| Select Name, PNPDeviceID, Status, Service
The service name of the specific COM port is shown in the Service column. For instance, for COM2 it is Serial. At present you need to run Procedure Explorer as an administrator and select Observe -> Find Handle or DLL from the menu. In the Handle or DLL substring line, enter the Service value obtained earlier. In our example, this is Series
.
Process Explorer should show the process name that is currently using your COM port. To release the COM port, impale the process or programme.
Resetting COM Port Numbers in Windows Registry
Data about the COM ports in apply is stored in CommDB registry parameter under the HKEY_LOCAL_MACHINE\Organisation\CurrentControlSet\Control\COM Name Arbiter reg cardinal.
- Open the Registry Editor (
regedit.exe
) and get to the registry key mentioned above;Important! Nosotros strongly recommend you lot to backup this registry key (File -> Export) before doing anything. If something goes wrong, y'all can restore the original COM port configuration.
- The value of ComDB parameter in the binary format determines the list of COM ports reserved in Windows. Each fleck determines the state of the respective port (from i to 255). For example, if yous need to leave the reservation only for COM3, the hex value of ComDB will be equal to 04 (0000 0100);
Important! Be very circumspect, and don't add whatever additional $.25 to the parameter, or the arrangement will start to fail into a BSOD.
- If you accept to reset all COM port bindings, alter the value of ComDB to 0;
Note. Yous can see the consummate listing of COM ports connected in Windows under the registry fundamental HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM. The registry entries nether the SERIALCOMM tin can only be present just when underlying devices are connected and ready. This subkey is part of the HARDWARE primal, and information technology is recreated each time the system starts.
- The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports registry key contains the list of all assigned COM port numbers. You tin can remove all unnecessary port reservations. In our example, we'll leave only COM3 and delete the rest ports;
- Unplug all external devices and restart your figurer;
- Afterwards the reboot, connect the devices in the necessary order, reinstall USB-to-serial converters, etc. All detected COM port devices will be automatically detected past the organisation and assigned sequential COM port numbers.
You can also utilize the following free tools to make clean up reserved COM ports:
- COM Proper noun Czar Tool – this tool tin help y'all to reset COM port reservations and find the used COM port numbers. Download the tool and run it as an ambassador. Select the COM ports you lot want to release and click Clear unused Reservations and Remove non-present devices;
- Device Cleanup Tool – the utility is used to search the registry for previously connected devices (under the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum
), remove unused devices, and articulate COM port reservations.
Source: http://woshub.com/how-to-clean-up-and-reset-com-ports-in-windows-7/
Posted by: meurerfiefultoothe.blogspot.com
0 Response to "How To Change Com Port Number Windows 7"
Post a Comment