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

starblue picture starblue · Dec 6, 2012 · Viewed 49.7k times · Source

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).

Answer

djs picture djs · Dec 8, 2012

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.