USB Devices are displayed in device manager Whereas USBView can retrieve it .

Two USB devices are connected with PC . And device manager shows them up(Driver are loaded correctly ) . Then I restart the devices simultaneously. After two devices are ready , Device manager can show them up normally(Driver are loaded correctly also) and , however , USBView can retrieve only one device while the other is missing .

I try to refresh the device manager again by scanning for new hardware . Then device manager refreshes for several time and , What’s more, the missing phone comes back in USBView.

In USBView , HUB-related op code is sent to hub driver to retrieve the status of specified port. I trace into USBHub and realize that there is such an execution sequence.
usbhub!USBH_HubDispatch->usbhub!USBH_FdoDispatch ->usbhub!USBH_IoctlGetNodeConnectionInformation

After debugging , I find the port to which phone is connected is in “no device connected” , Seems like a pointer , as a member in Hub FDO device extension , is tested to be NULL .
So my question is :

1 . Is that possible that Window maintain inconsistent information ? I mean this inconsistency happens between USBHub FDO and DeviceManager ?

  1. If so , what might cause this inconsistency ?

Thanks

Sorry , the title should be changed to “USB Devices are displayed in device manager Whereas USBView can NOT retrieve it .”

xiedong_sl@126.com wrote:

Two USB devices are connected with PC . And device manager shows them up(Driver are loaded correctly ) . Then I restart the devices simultaneously. After two devices are ready , Device manager can show them up normally(Driver are loaded correctly also) and , however , USBView can retrieve only one device while the other is missing .

I try to refresh the device manager again by scanning for new hardware . Then device manager refreshes for several time and , What’s more, the missing phone comes back in USBView.

In USBView , HUB-related op code is sent to hub driver to retrieve the status of specified port. I trace into USBHub and realize that there is such an execution sequence.
usbhub!USBH_HubDispatch->usbhub!USBH_FdoDispatch ->usbhub!USBH_IoctlGetNodeConnectionInformation

After debugging , I find the port to which phone is connected is in “no device connected” , Seems like a pointer , as a member in Hub FDO device extension , is tested to be NULL .
So my question is :

1 . Is that possible that Window maintain inconsistent information ? I mean this inconsistency happens between USBHub FDO and DeviceManager ?

  1. If so , what might cause this inconsistency ?

My guess would be that both devices have the same USB serial number.
You should be able to verify this in usbview. It shows the serial
number in the device descriptor section.

That is an error condition, one which Windows does not promise to handle.


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

If you can give solid repro steps we might be able to debug it. Does it
matter what 2 devices you use?

xiedong_sl@126.com wrote:

Two USB devices are connected with PC . And device manager shows them up(Driver are loaded correctly ) . Then I restart the devices simultaneously. After two devices are ready , Device manager can show them up normally(Driver are loaded correctly also) and , however , USBView can retrieve only one device while the other is missing .

I try to refresh the device manager again by scanning for new hardware . Then device manager refreshes for several time and , What’s more, the missing phone comes back in USBView.

In USBView , HUB-related op code is sent to hub driver to retrieve the status of specified port. I trace into USBHub and realize that there is such an execution sequence.
usbhub!USBH_HubDispatch->usbhub!USBH_FdoDispatch ->usbhub!USBH_IoctlGetNodeConnectionInformation

After debugging , I find the port to which phone is connected is in “no device connected” , Seems like a pointer , as a member in Hub FDO device extension , is tested to be NULL .
So my question is :

1 . Is that possible that Window maintain inconsistent information ? I mean this inconsistency happens between USBHub FDO and DeviceManager ?

  1. If so , what might cause this inconsistency ?

Thanks

Yes . this number is equivalent . Just wanna know What does windows do relying on this number ?

I also find that Windows assign 2 different device addresses to the same USB Device . Does it have something to do with it ?

So confused .

To Ries ,

This issue is not reproduced on all HW platforms . So , I am not sure you can reproduce at your side .

At our side , device is phone . The steps are like these :

Connect 2 equivalent phones with same version of firmware flashed . Send restart command to it using an internal tool. Note that manually restart doesn’t reproduce this issue .
After restart is done and phones are ready , the device manager can show them up correctly(driver are loaded correctly) , Launch USBView and find that there is only one in it .

At this time , I click rescan for the hardware in Device Manager and then , USBView can show both up.

I also see another issue on these phones.
Sometimes , PC tries to assign 2 different device addresses to one phone in the course of device enumeration by PC. Since the other phone doesn’t get device address so that it is not correctly enumerated by PC. Is it possible that USB data is sent to incorrect USB port queue and accordingly the configured phone receives the device address again ?

I suggest you can give some clue of how to therapy this issue remotely. And then I will follow it and report the result to you.

Sorry , one thing is corrected .
After phones are restarted , phone goes to another mode (Don’t care this term , just means phone report to a different PID) . At this time , serial number is null .

USB serial number has to be unique. If you can’t achieve it, don’t use
serial numbers. Connecting more devices with the same serial number lead
to BSOD in some Windows versions and I believe it was good. Currently it
shows the strange behaviour you see propably because more devices share
the same device node.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xiedong_sl@126.com
Sent: Wednesday, September 02, 2009 4:12 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USB Devices are displayed in device
manager Whereas USBView can retrieve it .

Yes . this number is equivalent . Just wanna know What does
windows do relying on this number ?

I also find that Windows assign 2 different device addresses
to the same USB Device . Does it have something to do with it ?

So confused .


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

it’s said that there is a registry entry that can disable the usage of serial number. google around and don’t find it . Anyone knows it ? ? thanks

Why don’t use serial numbers correctly, instead? Using the same serial
number for more devices is sort of ignorance.

How would registry entry help your customers which’d have problems when
connect more of your devices?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xiedong_sl@126.com
Sent: Wednesday, September 02, 2009 5:59 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USB Devices are displayed in device
manager Whereas USBView can retrieve it .

it’s said that there is a registry entry that can disable the
usage of serial number. google around and don’t find it .
Anyone knows it ? ? thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

This issue is going on with the entry disabled .

To Vodicka

As for "Currently it shows the strange behaviour you see propably because more devices share the same device node. " , Could you help to make it detailed ?

How can I get to know if it’s the case ?

Daniel Xie wrtoe:

"Currently it shows the strange behaviour you see propably because
more devices share the same device node. " , Could you help to make
it detailed ?

Meaning, if your USB device has a serial number, Windows considers it to be unique and the USB hub driver creates the device instance as a function of that serial number, and marks it as unique system-wide. Surely you can see the problem if you introduce another device at this point with the same serial number.

Thanks to Chris .

Based on the mentioned suggestion , I tried to do 2 tests :

flashing phone without serial number and flashing phone with 2 different serial number .

In both case , the mentioned issues still can be reproduced .

So , in addition to serial number , is it any other reason which might cause this case ?

Daniel Xie wrote:

So , in addition to serial number , is it any other reason which might
cause this case ?

Have you checked with a bus analyzer that these devices are cleanly unenumerating and reenumerating on the bus when they are restarting? This always gave us fits (in my prior life…)

xiedong_sl@126.com wrote:

Yes . this number is equivalent . Just wanna know What does windows do relying on this number ?

We JUST had a discussion about this earlier in the week. Windows needs
to uniquely identify each specific USB device, to know whether it has
already created a device node for this device or not. Each unique
device has its own spot in the registry to store its configuration
data. It uses the serial number to do that. (What else could it use?)

I also find that Windows assign 2 different device addresses to the same USB Device . Does it have something to do with it ?

Possibly. The actual behavior is undefined. Windows doesn’t support
this situation.

So confused .

No confusion needed. You can’t have two devices with the same serial
number. Not allowed. End of story. If you want to test multiple
devices, either give them each a unique serial number, or remove the
serial number altogether.


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

xiedong_sl@126.com wrote:

it’s said that there is a registry entry that can disable the usage of serial number. google around and don’t find it . Anyone knows it ? ? thanks

Copied from Jan Axelson’s FAQ:

This registry key controls whether Windows uses or ignores device serial
numbers:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags]

It’s possible to ignore all serial numbers, though this approach is NOT
recommended. To ignore all serial numbers, in the above key, change this
value to zero:

GlobalDisableSerNumGen = 1

To ignore the serial number for an individual device, create an entry
under the above …\UsbFlags key. The name must start with
“IgnoreHWSerNum” followed by the vendor and product ID of the device. A
value of 1 = “disable the serial number.”

Example (Vendor ID = 0925h, Product ID = 016Ah):

IgnoreHWSerNum0925016A= 1


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

Tim Roberts wrote:

Windows needs
to uniquely identify each specific USB device, to know whether it has
already created a device node for this device or not. […]
It uses the serial number to do that. (What else could it use?)

It uses HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB subkeys.

These are quite interesting read.

Hagen Patzke wrote:

Tim Roberts wrote:

> Windows needs
> to uniquely identify each specific USB device, to know whether it has
> already created a device node for this device or not. […]
> It uses the serial number to do that. (What else could it use?)
>

It uses HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB subkeys.

Well, speaking technically, it’s really the other way around. The
Enum\USB subkey is created from the PnP device ID, which is derived from
the serial number, if the device has one.

It’s not that the Enum\USB subkey is used to create the device node, but
rather that the unique ID in the device node is used to create (or find)
the Enum\USB subkey.


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

To Roberts

Thanks for the clarification on the question of serial number issue .

To Chris ,

Regarding issue of one phone , 2 addresses , USB analyzer log indicates PC tries to set 1 and 2 address to the same phone . When 1 is assigned , the phone address is changed from 0 to 1 and then when PC tries to set 2 to it , phone rejects it . In this case , the other phone is lost in device manager. I suppose that’s because there is not valid address for it .