Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get stable COM-ports for USB serial dongles in Windows XP?

I develop embedded systems and need serial ports for communication.

In Windows XP the numbers for USB serial port dongles keep moving around, which makes it hard to use in scripts or makefiles (for example for flash programming NXP controllers via their built-in bootloader, or for controlling a target and two lab devices at the same time).

Is there a way to fix the COM-port for such a dongle? In Linux I can do this via udev by matching against the serial number of FTDI dongles (see this answer I just gave while searching for an answer to this question).

like image 696
starblue Avatar asked Dec 06 '12 10:12

starblue


People also ask

How do I find COM ports on Windows XP?

Windows XPFrom the Start menu, right click My Computer and select Properties. Click the Hardware tab of the System Properties window. Select Device Manager to look up the assigned COM port of the ISEB hardware.


2 Answers

In my experience, plugging the device into the exact same USB port each time results in it getting the same COM port number.

It's also possible to change the port number assigned to a device (Device Manager, edit Properties of the COM port) if you need to plug it into a different USB port. In the past I have labeled a device with a COM port number, and then plugged it into each USB port on my laptop and reassigned the COM port to be that number, regardless of where it's plugged in.

like image 142
tomlogic Avatar answered Sep 21 '22 06:09

tomlogic


The FTDI driver will assign serial ports to the same COM ports by the serial number of the device connected. So, the ports should remain the same regardless of USB port. However, if you plug in a new USB device, it will not reuse the previously assigned COM ports.

FTDI has an app note explaining the process in more detail.

I've had general stability problems with Prolific drivers, so I do not use Prolific USB-to-serial devices and can't comment on their mapping strategy.

like image 25
djs Avatar answered Sep 19 '22 06:09

djs