Creating the multiple instance id's for same USB device.

hi

i am newbie in windows device drivers.

presently i am debugging windows USB drivers issue.

as we have seen in the registry, when we connect the device to the same usb
port it is creating multiple instance id’s to our device in some rare
scenarios.
when ever we connect the device first time it is creating single instance
id and using same instance id for any numbers plug and unplug the same
device to same usb port. but in very rare cases this behavior got changed
and creating the different instance id.specially when rebooting the pc
multiple times this behavior observed.

we have a custom driver which is going to creating the 2 virtual ports for
this device.as well as our devices has unique serial number for each device.

when ever different instance id’s are created the ports numbers changing
automatically.

what might be the root cause for this types of behaviors.

Thank you in advance for your help,

You need to look at the full instance ID path. If you have a unique serial number, it will be the last third part of the path. My guess is that when it changes you are not reporting the serial number properly and this the os creates the third part for you

Sent from my Windows 10 phone

From: johnny bashamailto:xxxxx
Sent: Monday, June 20, 2016 4:31 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Creating the multiple instance id’s for same USB device.

hi

i am newbie in windows device drivers.

presently i am debugging windows USB drivers issue.

as we have seen in the registry, when we connect the device to the same usb port it is creating multiple instance id’s to our device in some rare scenarios.
when ever we connect the device first time it is creating single instance id and using same instance id for any numbers plug and unplug the same device to same usb port. but in very rare cases this behavior got changed and creating the different instance id.specially when rebooting the pc multiple times this behavior observed.

we have a custom driver which is going to creating the 2 virtual ports for this device.ashttp: well as our devices has unique serial number for each device.

when ever different instance id’s are created the ports numbers changing automatically.

what might be the root cause for this types of behaviors.

Thank you in advance for your help,

— NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at</http:></mailto:xxxxx></mailto:xxxxx>

johnny basha wrote:

presently i am debugging windows USB drivers issue.

as we have seen in the registry, when we connect the device to the
same usb port it is creating multiple instance id’s to our device in
some rare scenarios.
when ever we connect the device first time it is creating single
instance id and using same instance id for any numbers plug and
unplug the same device to same usb port. but in very rare cases this
behavior got changed and creating the different instance id.specially
when rebooting the pc multiple times this behavior observed.

we have a custom driver which is going to creating the 2 virtual
ports for this device.as http: well as our devices has
> unique serial number for each device.
>
> when ever different instance id’s are created the ports numbers
> changing automatically.
>
> what might be the root cause for this types of behaviors.

This is the hardware ID for a device with a serial number:
USB\VID_04E8&PID_330F\Z7BQB8GD5D00NDK
The serial number in this case is Z7BQB8GD5D00NDK.

This is the hardware ID for a USB device without a serial number:
USB\VID_046D&PID_C52B\6&1c0feeb2&0&3
The individual parts of that last section have some fuzzy meaning. The
“6” says we are 6 levels deep in the device hierarchy, starting at the
PCI bus. The “1c9feeb2” is a unique random identifier for the hub we
are plugged into. The “0” says we are in port 0 of that hub.

As Doron said, if your device ever enumerates without a serial number,
you’ll get a new auto-generated name.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.</http:>

hi doron and tim thank u for your reply.

hers are some more information:
what are the details present in the below location and who will write this entries in registry.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\

what ever entries i am discussed in this forum is related to above location only. i am unable to find the multiple instances are creating or not from the location USB\VID_04E8&PID_330F\Z7BQB8GD5D00NDK" what ever tim discussed.

so i went to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ location seen different instances for same serial number device.

here i am copying registry keys.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_1

NGpsUsb\BMFN15281010M is stiring return by the our driver as result of BusQueryDeviceID.
USB_0 and USB_1 is string return by our driver as result of BusQueryInstanceID.
Note: our driver will create two virtual ports for single device.

like this creating multiple instances only in very cases and present in very few entries and remaining all are having the only single instance as per process.
since i have connected so many device to my system i have found this in registry.

What about the instance odd for the parent device enumerated by usb (usb.….…)? That is the one that Tim and I are referring to

Sent from my Windows 10 phone

From: xxxxx@gmail.commailto:xxxxx
Sent: Tuesday, June 21, 2016 2:54 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Creating the multiple instance id’s for same USB device.

hi doron and tim thank u for your reply.

hers are some more information:
what are the details present in the below location and who will write this entries in registry.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum<br>
what ever entries i am discussed in this forum is related to above location only. i am unable to find the multiple instances are creating or not from the location USB\VID_04E8&PID_330F\Z7BQB8GD5D00NDK" what ever tim discussed.

so i went to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ location seen different instances for same serial number device.

here i am copying registry keys.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_1

NGpsUsb\BMFN15281010M is stiring return by the our driver as result of BusQueryDeviceID.
USB_0 and USB_1 is string return by our driver as result of BusQueryInstanceID.
Note: our driver will create two virtual ports for single device.

like this creating multiple instances only in very cases and present in very few entries and remaining all are having the only single instance as per process.
since i have connected so many device to my system i have found this in registry.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx>

xxxxx@gmail.com wrote:

hers are some more information:
what are the details present in the below location and who will write this entries in registry.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\

what ever entries i am discussed in this forum is related to above location only. i am unable to find the multiple instances are creating or not from the location USB\VID_04E8&PID_330F\Z7BQB8GD5D00NDK" what ever tim discussed.

That is a subkey in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum.
That’s the root key for your physical USB device.

so i went to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ location seen different instances for same serial number device.

here i am copying registry keys.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\NGpsUsb\BMFN15281010M\USB_1

That is two pairs of identical keys, so you cannot possibly have all
four of them in a single system. What are you trying to say here?

NGpsUsb\BMFN15281010M is stiring return by the our driver as result of BusQueryDeviceID.
USB_0 and USB_1 is string return by our driver as result of BusQueryInstanceID.
Note: our driver will create two virtual ports for single device.

like this creating multiple instances only in very cases and present in very few entries and remaining all are having the only single instance as per process.
since i have connected so many device to my system i have found this in registry.

I can’t tell what you’re asking. It sounds like your USB driver is
acting as a bus driver, creating additional PDOs. Those PDOs have the
hardware IDs NGpsUsb\BMFN15281010M\USB_0 and
NGpsUsb\BMFN15281010M\USB_1. As soon as you create those PDOs, the Enum
registry node will be created to contain the information about those
devices.

So where does the duplication come into play?


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

what ever ur asking the physical device instance id to our device is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_09D7&PID_0100\BMFN15281010M. this is unique in the pc.

Yes Tim what ever your saying is right, our driver is acting as a bus driver and creating the two PDO’s.

here my problem is creating the multiple Enum registry nodes for the same device and same usb port. multitple nodes having different information stored(specially port numbers).

Generally single node is created and using the same node and information used for the same device any numbers of times plug and unplug the same device or reboot the pc with same port. but in some very rare cases different node created and storing the different information for the same device and same port.
once after creating the multiple nodes when we unplug and plug the device to same port it is applying the information of the either of the nodes. so when we unplug and plug the device or reboot the pc the port numbers(COM) are changing.so it is going to be a problem as part of some kind of automation. this behavior observed very rarely specially when rebooting the pc multiple times as part of automation related to different task in application level.

so i wanted to avoid creating multiple nodes. for that i want know who will create this nodes and what is the use of this node and why it is creating multiple nodes. as of my knowledge our driver only returns some stings as a result of some irp’s. as i mentioned earlier.

any information related to this kind of problems is helpful for me to resolve issue.

Based on your device id, USB\VID_09D7&PID_0100\BMFN15281010M, you are reporting a serial number (BMFN15281010M). My guess is that when you have a duplicate instance of your device, the serial number is not being reported properly so the underlying usb hub bus driver is not using it to create the device id. Is there another key under enum\USB\VID_09D7&PID_0100 for a different ID? Perhaps one that has “&” characters in it?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, June 22, 2016 5:49 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Creating the multiple instance id’s for same USB device.

what ever ur asking the physical device instance id to our device is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_09D7&PID_0100\BMFN15281010M. this is unique in the pc.

Yes Tim what ever your saying is right, our driver is acting as a bus driver and creating the two PDO’s.

here my problem is creating the multiple Enum registry nodes for the same device and same usb port. multitple nodes having different information stored(specially port numbers).

Generally single node is created and using the same node and information used for the same device any numbers of times plug and unplug the same device or reboot the pc with same port. but in some very rare cases different node created and storing the different information for the same device and same port.
once after creating the multiple nodes when we unplug and plug the device to same port it is applying the information of the either of the nodes. so when we unplug and plug the device or reboot the pc the port numbers(COM) are changing.so it is going to be a problem as part of some kind of automation. this behavior observed very rarely specially when rebooting the pc multiple times as part of automation related to different task in application level.

so i wanted to avoid creating multiple nodes. for that i want know who will create this nodes and what is the use of this node and why it is creating multiple nodes. as of my knowledge our driver only returns some stings as a result of some irp’s. as i mentioned earlier.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

xxxxx@gmail.com wrote:

what ever ur asking the physical device instance id to our device is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_09D7&PID_0100\BMFN15281010M. this is unique in the pc.

Yes Tim what ever your saying is right, our driver is acting as a bus driver and creating the two PDO’s.

here my problem is creating the multiple Enum registry nodes for the same device and same usb port. multitple nodes having different information stored(specially port numbers).

I don’t understand why it is so difficult for you to SHOW US exactly
which registry entries you think are being duplicated. You’re making us
guess, and apparently we haven’t guessed correctly yet.

Generally single node is created and using the same node and information used for the same device any numbers of times plug and unplug the same device or reboot the pc with same port. but in some very rare cases different node created and storing the different information for the same device and same port.

Why do you think so? What evidence do you have that this is happening?

once after creating the multiple nodes when we unplug and plug the device to same port it is applying the information of the either of the nodes. so when we unplug and plug the device or reboot the pc the port numbers(COM) are changing.so it is going to be a problem as part of some kind of automation. this behavior observed very rarely specially when rebooting the pc multiple times as part of automation related to different task in application level.

Ah, you had not previously mentioned anything about COM ports. The
assignment of fake COM port numbers is a somewhat delicate art. It is
quite dangerous to assume that a particular fake COM device is always
going to be assigned the same fake COM port number. Generally, the app
has to go look in the registry to find the exact number, like in
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM.


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

johnny basha wrote:

May be i am going wrong in escalating my issue to you guys.
as a proof i am attaching the screenshot of the registry entries in my
system.

Well, having to explain your problem to us is certainly going to give
you a clearer picture of what information you need to provide to
Microsoft support, should you decide to go to them. This one screenshot
presents a HUGE amount of information that you never provided before.
All you said was “duplicate entries”. You didn’t describe the entries,
so we didn’t know you were getting three entries that look like standard
USB devices.

the serial number of the device “DCH11190110” has more number of
entries as compared serial numbers other devices. each entry stored
different information.

Do all of these devices have the same install class (“Ports”)? It isn’t
possible that DCH11190110 exposes as a different type of device, like a
USB hub? The IDs that you’re getting here look like they were created
by the USB hub driver.

And your driver never passes the hardware ID request through to the
parent driver?


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

I apologize I wasn’t able to get back immediately.

Yes all the devices have same install class and using the same .INF files.

finally we observed that the com ports numbers getting changed for the same device and same usb ports when we are doing the plug and unplug the device multiple numbers of times.

but port numbers are changing in very rare scenarios. i am unable debug the issue by ellisys usb analyzer as well as message analyzer by Microsoft since it is happening in very rare scenarios.