I have composite USB devices that support multiple protocols: HID and a vendor specific class “A”.
I am using windows 7 x64.
For a given set of VID/PID the device may enumerate in either of the two following configurations:
cfg 1:
VID_xxxx&PID_yyyy&MI_00 = class A
VID_xxxx&PID_yyyy&MI_01 = HID
cfg 2:
VID_xxxx&PID_yyyy&MI_00 = class A
VID_xxxx&PID_yyyy&MI_01 = class A
The fact that two configurations share a unique set of VID/PID is not of my choosing; the host/device applications were originally written for a different OS which “allowed” such scenario. I am porting it to windows.
I developed the functional driver for class A (KMDF).To accommodate both cfgs, I defined the inf file to match cfg 2.
1)When I install the driver package unsigned I observe the following in device manager:
-When I plug in a device exposing cfg 1:
->interface #0 is assigned to class A functional driver.
->interface #1 is assigned to the HID kernel driver.
-When I plug in a device exposing cfg 2:
->interface #0 and #1 are assigned to class A functional driver.
This serves its purpose. Everything works perfectly in user mode also.
2)The problem I am having is when I install the signed driver package.
-When I plug in a device exposing cfg 1:
->interface #0 and #1 are both assigned to class A functional driver.
Under windbg, the configuration descriptors for both interfaces are a “mixed” bag:
for interface #0 it contains:
-interface #1 descriptor data (expect for interface number being 0)
-the HID descriptor.(but not the interrupt endpoint descriptor).
for interface #1 it matches the USB trace. (i.e. interface + HID + interrupt endpoint descriptors)
Is there a way to make the installation of the signed package works like in case 1?. From a user perspective (case 1), I get the windows red warning message asking me if I really want to install the driver because it is not signed. I am wondering if that, somehow, gives the kernel “enough” time to figure out that interface #0 really belongs to the HID class.
For case (2) there is no pause (i.e. windows red warning prompt) in the install so I am wondering if I am just getting lucky in case 1 and such configuration is not allowed under windows. In which case I am screwed.
If I tamper with the inf file from case 2 (just removing a comment to cause a signature mismatch) then I get the windows red prompt (just like in case 1) and everything works also like in case 1 as far as driver assignments are concerned. ?
Thank you in advance for any help I may get.