3

I am struggling to get Windows to load the default WinUSB driver for my device. Please note that I am looking for a solution that is using BOS descriptor (and not the old 0xEE string index).

The device enumerates and Windows tells me that it is installing the device, but the WinUSB driver is not loaded. I have tried everything that I can think of, but still I can't get Windows to load the driver. I even uninstall the device and delete the USB flags in the registry whenever I re-try, but to no avail. Is there anyone who can help me to get this to work?

I don't want WebUSB capabilities or anything additional. This is a non-composite device.

This is my BOS descriptor (as sent over USB):

05 0F 21 00 01 1C 10 05 00 DF 60 DD D8 89 
45 C7 4C 9C D2 65 9D 9E 64 8A 9F 00 00 03 
06 B2 00 01 00

And this my BOS descriptor set:

0A 00 00 00 00 00 03 06 B2 00 08 00 01 00   ..............
00 00 A8 00 08 00 02 00 00 00 A0 00 14 00   .............. 
03 00 57 49 4E 55 53 42 00 00 00 00 00 00   ..WINUSB...... 
00 00 00 00 84 00 04 00 07 00 2A 00 44 00   ..........*.D.
65 00 76 00 69 00 63 00 65 00 49 00 6E 00   e.v.i.c.e.I.n. 
74 00 65 00 72 00 66 00 61 00 63 00 65 00   t.e.r.f.a.c.e.
47 00 55 00 49 00 44 00 73 00 00 00 50 00   G.U.I.D.s...P.
7B 00 46 00 37 00 32 00 46 00 45 00 30 00   {.F.7.2.F.E.0.
44 00 34 00 2D 00 43 00 42 00 43 00 42 00   D.4.-.C.B.C.B.
2D 00 34 00 30 00 37 00 44 00 2D 00 38 00   -.4.0.7.D.-.8.
38 00 31 00 34 00 2D 00 39 00 45 00 44 00   8.1.4.-.9.E.D.
36 00 37 00 33 00 44 00 30 00 44 00 44 00   6.7.3.D.0.D.D. 
36 00 42 00 7D 00 00 00 00 00               6.B.}.....

The layout is:

typedef struct _SMSOS20DescriptorSet
{
    SDeviceDescSetHeader sDescriptorSetHeader;
    SConfigurationSubsetHeader sConfSubsetHeader;
    SFunctionSubsetHeader sFuncSubsetHeader;
    SDeviceCompatibleIdDescriptor sCompIdDescriptor;
    SDeviceRegDescDeviceInterfaceGUID sRegistryDescDevInterfaceGuid;
} SMSOS20DescriptorSet;

I have follewed these guides and doc:

UPDATE: when you have a non-composite device that only has a single a configuration, then you are not use any subset headers (neither 'Configuration subset header' nor 'Function subset header'). So, the correct layout in this case is:

typedef struct _SMSOS20DescriptorSet
{
    SDeviceDescSetHeader sDescriptorSetHeader;
    SDeviceCompatibleIdDescriptor sCompIdDescriptor; 
    SDeviceRegDescDeviceInterfaceGUID sRegistryDescDevInterfaceGuid;
} SMSOS20DescriptorSet;
  • Are both descriptors actually transmitted? Or where does Windows stop? The first one is missing a byte at the end (the `bAltEnumCode` field). It correctly declares the size 0x21, but only contains 0x20 bytes. – Codo Feb 05 '22 at 15:43
  • The missing bAltEnumCode is a copy paste error. It is transmitted. This is the transmission overview: GetDescriptor (Device) SetAddress GetDescriptor (Device) GetDescriptor (Configuration) GetDescriptor (Binary Object Store) Vendor request IN (0x01) GetDescriptor (String iSerialNumber) GetDescriptor (String lang IDs) GetDescriptor (String iProduct) GetDescriptor (Device qualifier) No more requests after this. – Christian Wittrock Feb 07 '22 at 09:37
  • Found the problem. Apparently, when you have a non-composite device that only has a single a configuration, then you are not use any subset headers (neither 'Configuration subset header' nor 'Function subset header'). So, the correct layout in this case is: typedef struct _SMSOS20DescriptorSet { SDeviceDescSetHeader sDescriptorSetHeader; SDeviceCompatibleIdDescriptor sCompIdDescriptor; SDeviceRegDescDeviceInterfaceGUID sRegistryDescDevInterfaceGuid; } SMSOS20DescriptorSet; – Christian Wittrock Feb 07 '22 at 10:42

1 Answers1

1

UPDATE: when you have a non-composite device that only has a single a configuration, then you are not use any subset headers (neither 'Configuration subset header' nor 'Function subset header'). So, the correct layout in this case is:

typedef struct _SMSOS20DescriptorSet
{
    SDeviceDescSetHeader sDescriptorSetHeader;
    SDeviceCompatibleIdDescriptor sCompIdDescriptor; 
    SDeviceRegDescDeviceInterfaceGUID sRegistryDescDevInterfaceGuid;
} SMSOS20DescriptorSet;