iSerialNumber string descriptor not accessible in Windows 10 under USB 3.0 controller

Hi,

I have a problem with a device, which works as expected in Windows 10 when connected to a USB 1.1 or 2.0 controller but not under a USB 3.0 controller. The device uses the FTDI D2XX driver.

*******************************************************

  1. What is happening
    *******************************************************
    When connected to a USB 3.0 controller, the device does not report the serial number string descriptor (which is required in my application).

Below is the USB device information reported by UsbTreeView tool (http://www.uwe-sieber.de/usbtreeview_e.html). Manufacturer and product info has been “x-ed” out.

+++++++++++++++++ Device Information ++++++++++++++++++
Device Description : xxxxxxxxxxxxxxxx
Device Path : \.\usb#vid_0403&pid_xxxx#5&87ba431&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Device ID : USB\VID_0403&PID_xxxx\5&87BA431&0&1
Hardware IDs : USB\VID_0403&PID_xxxx&REV_0600 USB\VID_0403&PID_xxxx
Driver KeyName : {3364ac42-ba6d-4b7a-a717-25127d8a4f41}\0001 ({3364AC42-BA6D-4B7A-A717-25127D8A4F41})
Driver : C:\WINDOWS\system32\drivers\ftdibus-mmc.sys (Version: 2.12.16.4 Date: 2016-06-24)
Driver Inf : C:\WINDOWS\inf\oem15.inf
Legacy BusType : PNPBus
Class : xxxxx
Class GUID : {3364ac42-ba6d-4b7a-a717-25127d8a4f41}
Interface GUID : {a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Service : FTDIBUS
Enumerator : USB
Location Info : Port_#0001.Hub_#0003
Location IDs : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(1), ACPI(SB)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HSP1)
Container ID : {c95af1da-d2c0-11e6-bf01-e8e0b7a4ff69}
Manufacturer Info : xxxxxxxxxxxxxx
Capabilities : 0x84 (Removable, SurpriseRemovalOK)
Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code : 0
Power State : D0 (supported: D0, D1, D2, D3, wake from D0, wake from D1, wake from D2)

---------------- Connection Information ---------------
Connection Index : 0x01 (1)
Connection Status : 0x01 (DeviceConnected)
Current Config Value : 0x01
Device Address : 0x02 (2)
Is Hub : 0x00 (no)
Number Of Open Pipes : 0x02 (2)
Device Bus Speed : 0x01 (Full-Speed)
Pipe0ScheduleOffset : 0x00 (0)
Pipe1ScheduleOffset : 0x00 (0)

--------------- Connection Information V2 -------------
Connection Index : 0x01 (1)
Length : 0x10 (16 bytes)
SupportedUsbProtocols : 0x03
Usb110 : 1 (yes)
Usb200 : 1 (yes)
Usb300 : 0 (no)
ReservedMBZ : 0x00
Flags : 0x00
DevIsOpAtSsOrHigher : 0 (Is not operating at SuperSpeed or higher)
DevIsSsCapOrHigher : 0 (Is not SuperSpeed capable or higher)
DevIsOpAtSsPlusOrHigher : 0 (Is not operating at SuperSpeedPlus or higher)
DevIsSsPlusCapOrHigher : 0 (Is not SuperSpeedPlus capable or higher)
ReservedMBZ : 0x00

------------------ Device Descriptor ------------------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x01 (Device Descriptor)
bcdUSB : 0x200 (USB Version 2.00)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x08 (8 bytes)
idVendor : 0x0403 (Future Technology Devices International Limited)
idProduct : 0xxxxx
bcdDevice : 0x0600
iManufacturer : 0x01 (String Descriptor 1)
Language 0x0409 : “xxxxxxxxxxxxxx”
iProduct : 0x02 (String Descriptor 2)
Language 0x0409 : “xxxxxxxxxxxxxxxxx”
iSerialNumber : 0x03 (String Descriptor 3)
bNumConfigurations : 0x01

------------------ String Descriptors -----------------
------ String Descriptor 0 ------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language ID[0] : 0x0409 (English - United States)
------ String Descriptor 1 ------
bLength : 0x1E (30 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : “xxxxxxxxxxxxxx”
------ String Descriptor 2 ------
bLength : 0x24 (36 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : “xxxxxxxxxxxxxxxxx”

---------------- Configuration Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x0020 (32 bytes)
bNumInterfaces : 0x01
bConfigurationValue : 0x01
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xA0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x01 (yes)
D4…0: Reserved, set 0 : 0x00
MaxPower : 0x2D (90 mA)

---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x02 (2 Endpoints)
bInterfaceClass : 0xFF (Vendor Specific)
bInterfaceSubClass : 0xFF
bInterfaceProtocol : 0xFF
iInterface : 0x02 (String Descriptor 2)
Language 0x0409 : “xxxxxxxxxxxxxxxxx”

----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0040 (64 bytes)
bInterval : 0x00 (ignored)

----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0040 (64 bytes)
bInterval : 0x00 (ignored)

*******************************************************
2. What I expect to happen
*******************************************************
Below is the USB device information from the same device connected to a USB 2.0 controller. The iSerialNumber string descriptor reports the serial number correctly!

+++++++++++++++++ Device Information ++++++++++++++++++
Device Description : xxxxxxxxxxxxxxxx
Device Path : \?\usb#vid_0403&pid_xxxx#6&21912155&0&3#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Device ID : USB\VID_0403&PID_xxxx\6&21912155&0&3
Hardware IDs : USB\VID_0403&PID_xxxx&REV_0600 USB\VID_0403&PID_xxxx
Driver KeyName : {3364ac42-ba6d-4b7a-a717-25127d8a4f41}\0002 ({3364AC42-BA6D-4B7A-A717-25127D8A4F41})
Driver : C:\WINDOWS\system32\drivers\ftdibus-mmc.sys (Version: 2.12.16.4 Date: 2016-06-24)
Driver Inf : C:\WINDOWS\inf\oem15.inf
Legacy BusType : PNPBus
Class : xxxxx
Class GUID : {3364ac42-ba6d-4b7a-a717-25127d8a4f41}
Interface GUID : {a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Service : FTDIBUS
Enumerator : USB
Location Info : Port_#0003.Hub_#0005
Location IDs : PCIROOT(0)#PCI(1D00)#USBROOT(0)#USB(1)#USB(3), ACPI(SB)#ACPI(PCI0)#ACPI(EHC1)#ACPI(HUB0)#ACPI(RMH0)#USB(3)
Container ID : {a7165e15-da86-11e6-bf03-e8e0b7a4ff69}
Manufacturer Info : xxxxxxxxxxxxxx
Capabilities : 0x84 (Removable, SurpriseRemovalOK)
Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code : 0
Power State : D0 (supported: D0, D1, D2, D3, wake from D0, wake from D1, wake from D2)

---------------- Connection Information ---------------
Connection Index : 0x03 (3)
Connection Status : 0x01 (DeviceConnected)
Current Config Value : 0x01
Device Address : 0x01 (1)
Is Hub : 0x00 (no)
Number Of Open Pipes : 0x02 (2)
Device Bus Speed : 0x01 (Full-Speed)
Pipe0ScheduleOffset : 0x00 (0)
Pipe1ScheduleOffset : 0x00 (0)

--------------- Connection Information V2 -------------
Connection Index : 0x03 (3)
Length : 0x10 (16 bytes)
SupportedUsbProtocols : 0x03
Usb110 : 1 (yes)
Usb200 : 1 (yes)
Usb300 : 0 (no)
ReservedMBZ : 0x00
Flags : 0x00
DevIsOpAtSsOrHigher : 0 (Is not operating at SuperSpeed or higher)
DevIsSsCapOrHigher : 0 (Is not SuperSpeed capable or higher)
DevIsOpAtSsPlusOrHigher : 0 (Is not operating at SuperSpeedPlus or higher)
DevIsSsPlusCapOrHigher : 0 (Is not SuperSpeedPlus capable or higher)
ReservedMBZ : 0x00

------------------ Device Descriptor ------------------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x01 (Device Descriptor)
bcdUSB : 0x200 (USB Version 2.00)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x08 (8 bytes)
idVendor : 0x0403 (Future Technology Devices International Limited)
idProduct : 0xxxxx
bcdDevice : 0x0600
iManufacturer : 0x01 (String Descriptor 1)
Language 0x0409 : “xxxxxxxxxxxxxx”
iProduct : 0x02 (String Descriptor 2)
Language 0x0409 : “xxxxxxxxxxxxxxxxx”
iSerialNumber : 0x03 (String Descriptor 3)
Language 0x0409 : “xxxxxxxxxxxx”
bNumConfigurations : 0x01

------------------ String Descriptors -----------------
------ String Descriptor 0 ------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language ID[0] : 0x0409 (English - United States)
------ String Descriptor 1 ------
bLength : 0x1E (30 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : “xxxxxxxxxxxxxx”
------ String Descriptor 2 ------
bLength : 0x24 (36 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : “xxxxxxxxxxxxxxxxx”
------ String Descriptor 3 ------
bLength : 0x1A (26 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : “xxxxxxxxxxxx”

---------------- Configuration Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x0020 (32 bytes)
bNumInterfaces : 0x01
bConfigurationValue : 0x01
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xA0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x01 (yes)
D4…0: Reserved, set 0 : 0x00
MaxPower : 0x2D (90 mA)

---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x02 (2 Endpoints)
bInterfaceClass : 0xFF (Vendor Specific)
bInterfaceSubClass : 0xFF
bInterfaceProtocol : 0xFF
iInterface : 0x02 (String Descriptor 2)
Language 0x0409 : “xxxxxxxxxxxxxxxxx”

----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0040 (64 bytes)
bInterval : 0x00 (ignored)

----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0040 (64 bytes)
bInterval : 0x00 (ignored)

*******************************************************
3. When is it happening
*******************************************************
The problem is reproducible on Windows 10 systems with an “Intel(R) USB 3.0 eXtensible-Hostcontroller - 1.0 (Microsoft)” with the (current) Microsoft driver versions:

  • USBXHCI.SYS (Version: 10.0.14393.0 Date: 2016-07-16)
  • UsbHub3.sys (Version: 10.0.14393.0 Date: 2016-07-16)

The problem does NOT occur on a Windows 10 system with a “Renesas USB 3.0 eXtensible-HostController - 0.96” with these driver versions:

  • USBXHCI.sys (Version 10.0.10240.16461 Date: 2015-09-14)
  • UsbHub3.sys (Version 10.0.10240.16603 Date: 2015-11-25)

The problem does NOT occur on Windows 7 systems with an Intel(R) USB 3.0 eXtensible-Hostcontroller!

  • iusb3xhc.sys (Version: 1.0.0.199 Date: 2012-01-04)
  • iusb3hub.sys (Version: 1.0.0.199 Date: 2012-01-04)

*******************************************************
5. How does this problem affect me
*******************************************************
Since we have to handle HID-based devices as well as FTDI-based devices in our application we implemented a mapping mechanism based on the serial number.
When the VerndorID, ProductID and SerialNumber reported by the Windows USB API match the information reported by the FTDI driver API we merge the device information which abstracts the handling of the specific device type.
Because the serial number is no longer reported, we cannot no longer match the device information and hence not detect the correct device type to handle.

As a workaround I tried to implement another matching mechanism based on the Port Chain information and FTDI’s LocID. Unfortunately only with partial success… FTDIs enumeration order for the LocID is not identical to the USB API order on all systems (worked on my machine with only one USB controller).

*******************************************************
6. What do I think the problem is
*******************************************************
I’m not really familiar with USB API development much less driver development so I can only speculate what exactly might be the problem.
I found similar problem reports on the internet and this list but without a clear solution:

It might be an incompatibility between the Intel USB 3.0 controller stack and the FTDI driver since the Renesas USB 3.0 controller stack works.

As far as I have read up on USB 3.0 the driver model seems to have changed a lot compared to 2.0. So maybe it is more restrictive regarding the specification…

*******************************************************
7. What I have tried so far
*******************************************************
I update to the latest driver versions for both the Intel controller as well as FTDI with no changes in result.

I ran USB3HWVerifierAnalyzer.exe from the Microsoft USB test tools, which shows me two errors:
#1: (UsbHub3/165): ~Error requesting device qualifier descriptor~ (translated from German)
#2: (UsbHub3/132): ~Error while device control transmission~ (translated from German)

I debugged my application to the point of IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION which returns the error code 0x001f.

I compared the output of Microsoft’s UsbView.exe, usbtreeview.exe and FTDI’s usbview.exe when connected under as USB 2.0 and a 3.0 controller, but I cannot figure out a significant difference.

I programmed the FTDI chip to report as a USB 1.1 device instead of 2.0 with no difference in behavior.

I implemented a workaround based on the LocID from the FTDI driver which did not work out since the enumeration order for the USB controllers is not clear to me.

*******************************************************
8. What is the expected resolution
*******************************************************
What I need to find is a way that allows me to detect which device is connected to which port in order to keep track of them and manage hot-plugging and device interchange for both HID and FTDI devices.
In order to open a connection to an FTDI device I need either the Serial Number or the Location ID.

The device serial number is the preferred way to do this because it’s unique and it work on Windows XP and Windows 7 and seems to work on Windows 10 but only for USB 2.0.

*******************************************************
9. My request
*******************************************************
Does anyone have ideas on how I can solve this problem? Or hints on what I might have overlooked?
Are there known incompatibilities/issues with certain USB 3.0 drivers and FTDI devices?

I would really appreciate any input on this!

Thanks and kind regards
Marcel

On Jan 17, 2017, at 4:38 AM, Gasser Marcel wrote:
>
> I have a problem with a device, which works as expected in Windows 10 when connected to a USB 1.1 or 2.0 controller but not under a USB 3.0 controller. The device uses the FTDI D2XX driver.

The problem here is not in the driver. Have you contacted FTDI to see what they have to say? I’m guessing this is an FTDI firmware problem. They became the market leader, even though their implementation is hardly exemplary.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Tim

Thanks, for your reply!
I did not contact them yet, but will have to do so. Although this would be the worst case scenario, if we would have to reprogram the FTDI chips.
What I do not understand is why it works with the Renesas USB 3.0 controller but not with the Intel. Can the implementations be so different? Both are Microsoft drivers… the Intel being more recent.

I’ll keep the thread updated, when I get feedback from FTDI.

Regards,
Marcel