How is COM port number associated with a USB port / device?
Posted on 2008-11-07
I bought a USB-to-Serial (DB9) adapter and it works fine. However, I need the serial device that plugs into the adapter's DB9 male to show up on COM3. So, I specify that in the adapter's driver properties under Device Manager (I'm in XP Pro SP3). This works fine. So my serial device is working properly on COM3 with this adapter plugged into a USB port.
Then, I unplug the USB adapter (from the USB port #1), wait a few seconds, and plug the USB adapter into a DIFFERENT USB port #2. Now, my serial device shows up on COM6. Bad news, 'cause my legacy software is looking for it on COM3.
So, I unplug the USB adapter from port #2, and plug it back into port #1. Bingo! It's shows back up as being on COM3!
When the USB adapter is plugged into USB port #2, I can "force" the COM setting back to COM3 in the adapter's driver properties (even though it says that COM3 is "In Use"). And, after forcing the setting back to COM3, my legacy software finds the serial device on COM3 and works fine again.
I'd like to understand more about how Windows XP associates a COM port number with a USB port and any tools that I can use to better understand this COM # allocation. Is there a way to tell XP to erase any associations that it has made regarding COM #'s for USB ports?