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