Why is my USB device sometimes creating another entry in the windows (7&10) registry?

204 views Asked by At
  1. What can cause a USB device to have double entries for the same device in the registry?

  2. How are the numbers following the "9&" derived (see below), i.e., 3406C40F and 2D6B958A, in case this is a hint to what is causing this problem.

My guess is that possibly the device reports itself differently during enumeration, possibly a different configuration and/or device descriptor.

Details of the test that causes this problem: I am running a USB plug/unplug enumeration test where every time I plug in the device I verify various things to make sure that the enumeration is correct. This cycle is repeated 1000's of times. This a development test.

Upon enumeration, the test uses devcon.exe to verify some things about the collections. For some unknown reason, after some number of enumerations, the numbers associated with the collections is changing. Further investigation shows what appears to be two entries in the registry for the same device with these same numbers.

\9&3406C40F is the number at the beginning of the test associated with each collection

and some time later after several hundred enumerations it changes, in this case to

\9&2D6B958A

initial enumeration 2020-09-18 16:09:22,066 main INFO =========> devcon.exe "find HID"\vid_047F* <=========

HID\VID_047F&PID_015D&MI_03&COL05\9&3406C40F&0&0004 : HID-compliant device HID\VID_047F&PID_015D&MI_03&COL01\9&3406C40F&0&0000 : HID-compliant device HID\VID_047F&PID_015D&MI_03&COL02\9&3406C40F&0&0001 : HID-compliant device HID\VID_047F&PID_015D&MI_03&COL03\9&3406C40F&0&0002 : HID-compliant consumer control device
HID\VID_047F&PID_015D&MI_03&COL04\9&3406C40F&0&0003 : HID-compliant device

several hundred enumerations later,

HID\VID_047F&PID_015D&MI_03&COL01\9&2D6B958A&0&0000 :HID-compliant device HID\VID_047F&PID_015D&MI_03&COL02\9&2D6B958A&0&0001 :HID-compliant device HID\VID_047F&PID_015D&MI_03&COL03\9&2D6B958A&0&0002 :HID-compliant consumer control device
HID\VID_047F&PID_015D&MI_03&COL04\9&2D6B958A&0&0003 :HID-compliant device HID\VID_047F&PID_015D&MI_03&COL05\9&2D6B958A&0&0004 :HID-compliant device

I've run this test for millions of cycles on other devices but I have never seen this problem before. It is happening on win7 and win10.

Any help would be very appreciated! thx!

1

There are 1 answers

0
piton On

It's a device bug. The device is intermittently not reporting it's serial number so the OS creates a new entry with a different LUID (locally unique ID).