USB Newbie Question

I’ll show some (well, a lot…) of ignorance here. But I have been asked a
question in an area I’m not familiar with. So, here goes.

The question concerns testing USB-Ethernet devices by a house that simply
tests these devices as a service. Basically, it is a hardware QA house. The
company does not actually manufacture the devices - they just test them.

The USB-Ethernet devices may come from a variety of hardware vendors and use
different driver designs. Some are RNDIS and some are NDIS-WDM widgets.

Test house wants to test multiple USB-Ethernet devices by plugging in 8 at a
time into a USB hub. Their test software generally works, with one
exception…

Problem is that in some cases Windows XP recognizes and installs NDIS
miniport instances for only some of the 8 USB devices that are plugged
into the hub. USBView can see all of the devices, but the NDIS wrapper does
not load all of them as a miniport that can be seen in SetupDi or network
control panel.

I think that this is related to whether or not the USB device has a serial
number. Some do, some don’t. This can’t be controlled by the company asking
the question…

Can the lack of a serial number (or having a duplicate serial number for all
devices) prevent multiple instances of otherwise identical USB devices from
being recognized and installed on Windows XP?

(My research so far seems to suggest this can cause this type of problem).

If so, could a WDF USB filter driver be cooked up to “fake” a serial number
for each USB port, possibly eliminating the non-recognition problem for this
test station? If so, what would be some pointers?

TIA,

Thomas F. Divine

Yes, if the devices have the same serial number they won’t be started.
They might enumerate though, I don’t know how far into the enum process
we go before we stop b/c of a duplicated serial number.

The serial number is reported before a stack is built and started, the
PDO is enumerated and then the PnP manager sends a PnP query caps irp
which the bus uses to indicate that the PDO has a unique ID. The PDO is
then queried for the ID. If you want to be involved at this stage you
need to write a bus filter because you need to attach to the PDO before
the stack is built based on the hw/compat IDs to control the reporting
of the unique ID attribute and the actual ID reported. KMDF does not
support writing bus filters so you would have to go WDM, but I think you
are going to hit bigger problems later on. For instance, if the devices
are multiple hubs you would have to install your filter on each hub’s
FDO stack to reuniquify the device.

Btw, you should be able to see if the device has a serial number in
usbview.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F. Divine
Sent: Tuesday, December 12, 2006 2:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB Newbie Question

I’ll show some (well, a lot…) of ignorance here. But I have been asked
a
question in an area I’m not familiar with. So, here goes.

The question concerns testing USB-Ethernet devices by a house that
simply
tests these devices as a service. Basically, it is a hardware QA house.
The
company does not actually manufacture the devices - they just test them.

The USB-Ethernet devices may come from a variety of hardware vendors and
use
different driver designs. Some are RNDIS and some are NDIS-WDM widgets.

Test house wants to test multiple USB-Ethernet devices by plugging in 8
at a
time into a USB hub. Their test software generally works, with one
exception…

Problem is that in some cases Windows XP recognizes and installs NDIS
miniport instances for only some of the 8 USB devices that are plugged
into the hub. USBView can see all of the devices, but the NDIS wrapper
does
not load all of them as a miniport that can be seen in SetupDi or
network
control panel.

I think that this is related to whether or not the USB device has a
serial
number. Some do, some don’t. This can’t be controlled by the company
asking
the question…

Can the lack of a serial number (or having a duplicate serial number for
all
devices) prevent multiple instances of otherwise identical USB devices
from
being recognized and installed on Windows XP?

(My research so far seems to suggest this can cause this type of
problem).

If so, could a WDF USB filter driver be cooked up to “fake” a serial
number
for each USB port, possibly eliminating the non-recognition problem for
this
test station? If so, what would be some pointers?

TIA,

Thomas F. Divine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

> -----Original Message-----

From: xxxxx@lists.osr.com [mailto:bounce-272693-
xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, December 12, 2006 7:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB Newbie Question

Yes, if the devices have the same serial number they won’t be started.
They might enumerate though, I don’t know how far into the enum process
we go before we stop b/c of a duplicated serial number.

The serial number is reported before a stack is built and started, the
PDO is enumerated and then the PnP manager sends a PnP query caps irp
which the bus uses to indicate that the PDO has a unique ID. The PDO is
then queried for the ID. If you want to be involved at this stage you
need to write a bus filter because you need to attach to the PDO before
the stack is built based on the hw/compat IDs to control the reporting
of the unique ID attribute and the actual ID reported. KMDF does not
support writing bus filters so you would have to go WDM,
[PCAUSA] Too bad. I was hoping to use KMDF for the first time (besides
trying the OSR toy…).

but I think you
are going to hit bigger problems later on. For instance, if the devices
are multiple hubs you would have to install your filter on each hub’s
FDO stack to reuniquify the device.
[PCAUSA] This is for a one-of test setup. I get your point, though.

Will be a fair amount of work just to allow testing of cheap devices.

Btw, you should be able to see if the device has a serial number in
usbview.
[PCAUSA] Yep. I have USBView going.

The objective here is to efficiently run some simple tests on up to 800
devices a day without having skilled technician.

Thanks for your time, Doron.

Any other advice is also welcome.

Thomas F. Divine

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F. Divine
Sent: Tuesday, December 12, 2006 2:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB Newbie Question

I’ll show some (well, a lot…) of ignorance here. But I have been asked
a
question in an area I’m not familiar with. So, here goes.

The question concerns testing USB-Ethernet devices by a house that
simply
tests these devices as a service. Basically, it is a hardware QA house.
The
company does not actually manufacture the devices - they just test them.

The USB-Ethernet devices may come from a variety of hardware vendors and
use
different driver designs. Some are RNDIS and some are NDIS-WDM widgets.

Test house wants to test multiple USB-Ethernet devices by plugging in 8
at a
time into a USB hub. Their test software generally works, with one
exception…

Problem is that in some cases Windows XP recognizes and installs NDIS
miniport instances for only some of the 8 USB devices that are plugged
into the hub. USBView can see all of the devices, but the NDIS wrapper
does
not load all of them as a miniport that can be seen in SetupDi or
network
control panel.

I think that this is related to whether or not the USB device has a
serial
number. Some do, some don’t. This can’t be controlled by the company
asking
the question…

Can the lack of a serial number (or having a duplicate serial number for
all
devices) prevent multiple instances of otherwise identical USB devices
from
being recognized and installed on Windows XP?

(My research so far seems to suggest this can cause this type of
problem).

If so, could a WDF USB filter driver be cooked up to “fake” a serial
number
for each USB port, possibly eliminating the non-recognition problem for
this
test station? If so, what would be some pointers?

TIA,

Thomas F. Divine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

If just plug one device per HC you should have no issue ;). You can
load up a machine with a bunch of off the shelf USB 2.0 host controllers
(I would avoid the VIA chipset and get the Compaq ones instead) to scale
out.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F. Divine
Sent: Tuesday, December 12, 2006 4:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB Newbie Question

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-272693-
xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, December 12, 2006 7:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB Newbie Question

Yes, if the devices have the same serial number they won’t be started.
They might enumerate though, I don’t know how far into the enum
process
we go before we stop b/c of a duplicated serial number.

The serial number is reported before a stack is built and started, the
PDO is enumerated and then the PnP manager sends a PnP query caps irp
which the bus uses to indicate that the PDO has a unique ID. The PDO
is
then queried for the ID. If you want to be involved at this stage you
need to write a bus filter because you need to attach to the PDO
before
the stack is built based on the hw/compat IDs to control the reporting
of the unique ID attribute and the actual ID reported. KMDF does not
support writing bus filters so you would have to go WDM,
[PCAUSA] Too bad. I was hoping to use KMDF for the first time (besides
trying the OSR toy…).

but I think you
are going to hit bigger problems later on. For instance, if the
devices
are multiple hubs you would have to install your filter on each hub’s
FDO stack to reuniquify the device.
[PCAUSA] This is for a one-of test setup. I get your point, though.

Will be a fair amount of work just to allow testing of cheap devices.

Btw, you should be able to see if the device has a serial number in
usbview.
[PCAUSA] Yep. I have USBView going.

The objective here is to efficiently run some simple tests on up to 800
devices a day without having skilled technician.

Thanks for your time, Doron.

Any other advice is also welcome.

Thomas F. Divine

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F.
Divine
Sent: Tuesday, December 12, 2006 2:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB Newbie Question

I’ll show some (well, a lot…) of ignorance here. But I have been
asked
a
question in an area I’m not familiar with. So, here goes.

The question concerns testing USB-Ethernet devices by a house that
simply
tests these devices as a service. Basically, it is a hardware QA
house.
The
company does not actually manufacture the devices - they just test
them.

The USB-Ethernet devices may come from a variety of hardware vendors
and
use
different driver designs. Some are RNDIS and some are NDIS-WDM
widgets.

Test house wants to test multiple USB-Ethernet devices by plugging in
8
at a
time into a USB hub. Their test software generally works, with one
exception…

Problem is that in some cases Windows XP recognizes and installs NDIS
miniport instances for only some of the 8 USB devices that are
plugged
into the hub. USBView can see all of the devices, but the NDIS wrapper
does
not load all of them as a miniport that can be seen in SetupDi or
network
control panel.

I think that this is related to whether or not the USB device has a
serial
number. Some do, some don’t. This can’t be controlled by the company
asking
the question…

Can the lack of a serial number (or having a duplicate serial number
for
all
devices) prevent multiple instances of otherwise identical USB devices
from
being recognized and installed on Windows XP?

(My research so far seems to suggest this can cause this type of
problem).

If so, could a WDF USB filter driver be cooked up to “fake” a serial
number
for each USB port, possibly eliminating the non-recognition problem
for
this
test station? If so, what would be some pointers?

TIA,

Thomas F. Divine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

> -----Original Message-----

From: xxxxx@lists.osr.com [mailto:bounce-272693-
xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, December 12, 2006 7:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB Newbie Question

Yes, if the devices have the same serial number they won’t be started.
They might enumerate though, I don’t know how far into the enum process
we go before we stop b/c of a duplicated serial number.

The serial number is reported before a stack is built and started, the
PDO is enumerated and then the PnP manager sends a PnP query caps irp
which the bus uses to indicate that the PDO has a unique ID. The PDO is
then queried for the ID. If you want to be involved at this stage you
need to write a bus filter because you need to attach to the PDO before
the stack is built based on the hw/compat IDs to control the reporting
of the unique ID attribute and the actual ID reported. KMDF does not
support writing bus filters so you would have to go WDM, but I think you
are going to hit bigger problems later on. For instance, if the devices
are multiple hubs you would have to install your filter on each hub’s
FDO stack to reuniquify the device.

Btw, you should be able to see if the device has a serial number in
usbview.

d

[PCAUSA] Additional question.

Assuming that each USB-Ethernet device did have unique USB serial number
(but was otherwise identical), are there other likely reasons (besides
driver flaws) that are likely to prevent the system handling up to eight
multiple devices?

Thomas F. Divine

> -----Original Message-----

From: xxxxx@lists.osr.com [mailto:bounce-272700-
xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, December 12, 2006 7:47 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB Newbie Question

If just plug one device per HC you should have no issue ;). You can
load up a machine with a bunch of off the shelf USB 2.0 host controllers
(I would avoid the VIA chipset and get the Compaq ones instead) to scale
out.

d

[PCAUSA] That would probably be a good solution for this one-of case!

Thomas F. Divine

“Doron Holan” wrote in message news:xxxxx@ntdev…
>If just plug one device per HC you should have no issue ;).

Doron,
why adding more HCs should help? Does XP have
a limit of devices per HC? or this is related to ser. numbers issue?

Regards,
–PA

It’s related to the serial number problem. The serial number has to be
unique per HC, not unique to the entire machine.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
Sent: Wednesday, December 13, 2006 6:21 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB Newbie Question

“Doron Holan” wrote in message
news:xxxxx@ntdev…
>If just plug one device per HC you should have no issue ;).

Doron,
why adding more HCs should help? Does XP have
a limit of devices per HC? or this is related to ser. numbers issue?

Regards,
–PA


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

“Doron Holan” wrote in message news:xxxxx@ntdev…
> It’s related to the serial number problem. The serial number has to be
> unique per HC, not unique to the entire machine.
>
>d

Very interesting, thanks.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
Sent: Wednesday, December 13, 2006 6:21 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB Newbie Question

“Doron Holan” wrote in message
news:xxxxx@ntdev…
>If just plug one device per HC you should have no issue ;).

Doron,
why adding more HCs should help? Does XP have
a limit of devices per HC? or this is related to ser. numbers issue?

Regards,
–PA


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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