If I connect an USB device to an USB port the "Found new hardware wizard" pops up. Installation works and all is fine. However, if I disconnect the device and reconnect to ANOTHER port on the PC the wizard pops up again! The drivers are already there so why the ---- does it need to install the drivers again?

After some fiddling in the registry (HKLM) it seems that the driver database is implemented in such a way that each peripheral is identified by its connected port... duh!

Does anyone know of a work around? I would really like to install the drivers ONCE and dont care much about which USB port the user chooses to plug into.

Best regards,
Mikael

Re: USB devices need drivers (again) when you change port?!? by Maxim

Maxim
Tue Feb 03 09:50:37 CST 2004

This question is surely FAQable, it is asked too often.

> If I connect an USB device to an USB port the "Found new hardware wizard"
pops up.
>Installation works and all is fine. However, if I disconnect the device and
reconnect to
>ANOTHER port on the PC the wizard pops up again! The drivers are already there
so why the
>---- does it need to install the drivers again?

This is a normal and documented behaviour if the USB hardware has no unique ID
in the configuration descriptor. The OS creates a new devnode per each device
arrival in this case, and re-runs the driver installation.

> After some fiddling in the registry (HKLM) it seems that the driver database
is implemented in
>such a way that each peripheral is identified by its connected port... duh!

If there is no unique ID in the hardware - then yes.

> Does anyone know of a work around?

The only possible workaround is to burn the unique IDs to the device's
configuration descriptors (I expect them to be in the firmware or some ROM).

Note that after this, you must really provide the uniqueness guarantee during
hardware manufacturing (yes, hardware and not downloadable firmware). If you
will lie, and just put some arbitrary junk to the unique ID field - then
Windows will crash badly if 2 devices with the equal IDs are inserted.

Sorry, this is the USB spec requirement. USB technology gives only 2 choices -
no unique ID at all, but with driver reinstall each insert - or unique ID
support, but it must be really unique and not some piece of junk. USB does not
support any third choice.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: USB devices need drivers (again) when you change port?!? by Marc

Marc
Tue Feb 03 10:02:57 CST 2004


"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:uknY80m6DHA.2488@TK2MSFTNGP09.phx.gbl...
> This question is surely FAQable, it is asked too often.
>
> > If I connect an USB device to an USB port the "Found new hardware
wizard"
> pops up.
> >Installation works and all is fine. However, if I disconnect the device
and
> reconnect to
> >ANOTHER port on the PC the wizard pops up again! The drivers are already
there
> so why the
> >---- does it need to install the drivers again?
>
> This is a normal and documented behaviour if the USB hardware has no
unique ID
> in the configuration descriptor. The OS creates a new devnode per each
device
> arrival in this case, and re-runs the driver installation.
>
> > After some fiddling in the registry (HKLM) it seems that the driver
database
> is implemented in
> >such a way that each peripheral is identified by its connected port...
duh!
>
> If there is no unique ID in the hardware - then yes.
>
> > Does anyone know of a work around?
>
> The only possible workaround is to burn the unique IDs to the device's
> configuration descriptors (I expect them to be in the firmware or some
ROM).
>
> Note that after this, you must really provide the uniqueness guarantee
during
> hardware manufacturing (yes, hardware and not downloadable firmware). If
you
> will lie, and just put some arbitrary junk to the unique ID field - then
> Windows will crash badly if 2 devices with the equal IDs are inserted.
>
> Sorry, this is the USB spec requirement. USB technology gives only 2
choices -
> no unique ID at all, but with driver reinstall each insert - or unique ID
> support, but it must be really unique and not some piece of junk. USB does
not
> support any third choice.

Actually, this is not a USB spec requirement, it is a Windows implementation
issue. The USB spec gives two choices, yes. It does not specify anything
about having to reinstall drivers on each insert.

Marc Reinig
System Solutions



Re: USB devices need drivers (again) when you change port?!? by Maxim

Maxim
Tue Feb 03 10:22:29 CST 2004

> Actually, this is not a USB spec requirement, it is a Windows implementation
> issue. The USB spec gives two choices, yes. It does not specify anything
> about having to reinstall drivers on each insert.

Anyway the USB spec does not allow non-unique junk in this field.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: USB devices need drivers (again) when you change port?!? by Leo

Leo
Wed Feb 04 00:11:18 CST 2004

"Mikael" <anonymous@discussions.microsoft.com> wrote in message
news:97B59F05-6599-440E-8C89-27EA2054D43F@microsoft.com...
> If I connect an USB device to an USB port the "Found new hardware wizard"
pops up. Installation works and all is fine. However, if I disconnect the
device and reconnect to ANOTHER port on the PC the wizard pops up again! The
drivers are already there so why the ---- does it need to install the
drivers again?
>
> After some fiddling in the registry (HKLM) it seems that the driver
database is implemented in such a way that each peripheral is identified by
its connected port... duh!
>
> Does anyone know of a work around? I would really like to install the
drivers ONCE and dont care much about which USB port the user chooses to
plug into.

Add a serial number string to your device descriptor.

Leo Havmøller.



Re: USB devices need drivers (again) when you change port?!? by Pavel

Pavel
Wed Feb 04 08:37:48 CST 2004

"Mikael" <anonymous@discussions.microsoft.com> wrote in message
news:97B59F05-6599-440E-8C89-27EA2054D43F@microsoft.com...
> Does anyone know of a work around? I would really like to install the drivers ONCE and dont care much about which USB
port the user chooses to plug into.

Yes, kind of. Rather a dirty hack. MS folks please close your ears :)

When the "wizard" shows up, the instance subkey is already created.
Then, look for other instances under same HW ID with driver installed (have "driver" value in the subkey).
Copy (or move) contents of this subkey into the new node.
Cancel the "wizard" off, unplug and replug the device, or reenumerate by program.
The driver is not active on that other instance(s) because you have only one device.
Of course there is a long way from this trick to anything suitable for end user product.

- PA