4

We are developing a desktop application under Windows 10 x64 v2004 to control virtual USB COM ports where the devices will be connected/disconnected several times during operation:

  • While connecting to a virtual COM port, we get sporadic access denied errors due to more than one virtual COM port being assigned the same port number
  • Device Manager shows two USB serial devices with the same COM port number:
    Screenshot 1
  • Properties of the two USB serial devices simultaneously assigned the same COM4 port:
    Screenshot 2

This leads me to believe this is a bug in the OS:

  • What is the reason that one device is listed as USB Serial Port, while the other is listed as USB Serial Device?
  • Is one of the two driver manufacturers not following Microsoft's device driver rules?
  • Can that difference explain the root cause of this issue or is there still a general issue in the virtual port addressing?

To automatically correct this, is it possible to cause the OS to re-assign the port number of an affected virtual COM port?

  • In a case like this, the only thing I can currently do is the lousy workaround of asking the user to unplug/plug back in the second connected device
3
  • FTDI is the gold standard of USB serial chip manufacturers, so they can be ruled out as not conforming to Microsoft's device driver rules (I regularly use FTDI USB-to-TTL serial cables and have never come across an issue with their implementation), and the USB Serial Device appears to be using Microsoft's generic driver according to the Properties. I do know folks experience issues with non-FTDI USB serial cables and this appears to be an issue with the serial chip or firmware in the non-FTDI cable - were drivers for both cables installed?
    – JW0914
    Sep 22, 2020 at 14:01
  • Yes, the second chip (USB serial device with the MS driver) is a Silicon Lab CP210x. If I want to install the x64 driver from the manufacturer, the installer tells me: "The device driver installation wizard did not update any of your software for your hardware devices because it was not better than the software you currently have installed". Do you have any hints how I can overwrite the Microsoft Standard Driver here? Sep 22, 2020 at 17:07
  • 1
    You can bypass that by right-clicking on the .inf files themselves and selecting install from the menu. Occassionally a developer stores them inside the installer's .exe, and depending on how they did so, you can sometimes extract them with 7zip (right-click .exe → 7-Zip → Extract to)
    – JW0914
    Sep 23, 2020 at 11:27

4 Answers 4

2

What is the reason that one device is listed as USB Serial Port, while the other is listed as USB Serial Device?

Because the two involved device drivers announced different names for their devices.

Is one of the two driver manufacturers not following Microsoft's device driver rules?

Not necessarily, Windows can make this mistake by itself.

Can that difference explain the root cause of this issue or is there still a general issue in the virtual port addressing?

Devices having serial numbers are recognized by Windows no matter which USB port you plug them into. I would guess that one of the devices was plugged-in previously on COM4, where the other is now plugged-in, so Windows just remembered it from before.

This is perhaps a racing condition, which as you say is cleared by one device disconnecting and re-connecting. I don't know of a solution, beside ensuring that you are using the right drivers.

1
  • That is exactly what I have assumed (and feared). Unfortunately, I do not have a better solution than to inform the user to re-plug the device in such situation. Sep 22, 2020 at 17:09
2

I had a very similar problem in which 2 devices appeared as COM4. I was able to solve this by changing the COM port numbers for both devices in device manager - advanced port settings.

1

One would expect the OS to solve/prevent this from happening.

Solution is to manually change one of the device's COM port number

1

This looks like a bug in the Microsoft OS. Try installing the FTDI driver manually and click 'OK' when Windows complains about the driver.

Note 1: Microsoft can't even get the Windows search to work properly. How do you expect them to get a COM port work.

Note 2: If you don't believe me have a look at this document from FTDI

https://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_152_USB_3.0_Compatibility_Issues_Explained.pdf

Then take note of this line "All these (Windows) discrepancies add up to unpredictable behavior."

And this line "it is FTDI’s view that the problem lies with the USB host vendors and the issue should not be passed to all USB device manufacturers."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .