These days machines do not have physical serial (COM) ports any more. I do not understand why the USB group had missed to define a clean serial communication standard :-(. And the same mistake gets repeated for BLE again 😦 :-(. So every vendor and provider has its own USB CDC driver and interface. And it is really a big pain of the virtual COM/USB CDC ports installed. I have seen countless cases where “the USB UART or CDC port does not work”. So if you have such a problem, I might have a tip for you: Show hidden devices in the Windows Device manager. But in a special way I had not thought about it!
Thanks to a tip from Mike S. (thank you again, Mike!), I was able to solve a strange COM port on my machine which I had with mbed serial ports. But that trick can help you with any other kind of serial port.
Show Hidden Devices?
In the Windows Device Manager, there is an option to show hidden devices:
Well, I *thought* that in the past this was doing what is supposed to do: to show hidden devices. But when I turn that option on, I get this:
Do you see the problem? No? Well, it seems that I do not have any hidden Ports? Well, actually not true. The problem I have faced somehow that the serial virtual port has been assigned a high port number causing it to crash. But I do not see the reason for such a high port number?
Show the hidden devices
There is a Microsoft technical article about this problem: https://support.microsoft.com/en-us/kb/315539. So the solution is:
- Run cmd.exe as administrator
- Execute the following command to set an environment variable:
- Execute the following command to launch the Device Manager with that setting:
And now look at THIS (hidden devices shown grayed out):
I had over 200 (!!!!!) mbed Serial Ports listed. Yikes!!!!
Now with the devices visible, I was able to uninstall them. I had to reboot my machine afterwards too, but now my virtual serial ports was working properly :-).
💡 As mentioned in the comments of this post, the need for having for each USB CDC device on Windows seems to be a Windows specific problem. E.g. for the Freescale USB CDC devices I do not need a driver, all what I need is a .inf file with correct device/vendor ID. But other vendors (including mbed) are indeed providing their own serial driver, which on its own is a problem: that driver is not really necessary.
I don’t know since when I’m not able to see hidden devices in the Windows Device Manager any more, and maybe the University IT department has pushed such a setting to my machine. But using above trick I’m able to see and uninstall/remove all these ghost/hidden devices to have a clean state. And after rebooting my serial port problem went away 🙂
Happy Unhiding 🙂