Windows USB COM ports proliferation workaround with xhci

Windows USB COM ports proliferation is a known event happening when many devices of the same type are attached to a system, since Windows creates a different set of COM ports for each device showing a different serial number (see USB SerialNumber descriptor). This behavior is especially annoying in development machines where many devices of the same type should be attached.

Windows USB COM ports

Until Windows 7, a possible solution was to modify Windows registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags

adding the following value

"IgnoreHWSerNumVIDPID"=hex:01

where VID and PID are the Vendor ID and Product ID of the device for which USB COM ports proliferation should be avoided.

Basically this registry setting instructs Windows not to consider the serial number of the device and reuse the same port numbers.

Windows USB COM ports proliferation in Windows 8.x and 10

Unfortunately this method is not working anymore in Windows 8.x and 10 with xhci hosts: digging through Windows documentation, however, returned another possible solution for this need.

First of all, detach the USB device and from device manager uninstall all the hidden elements bound to this device (if it is a composite device, it should be enough to remove that from the “Universal Serial Bus controllers” item).

Open regedit and look for the path

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\VIDPIDREV

where VID, PID and REV are the Vendor ID, Product ID and revision of the USB device. Inside that key create a new DWORD value as following

"IgnoreHWSerNum"=hex:01

Then you can attach again the USB devices, verifying that, even with different serial numbers, the same set of USB COM ports are used.