Forcing USB serial number

I have a product which provides a USB serial interface (using standard
windows driver usbser.sys) on winxp SP3. The product has unique serial numbers which are used as the device instance id during USB enumeration so that each device gets assigned a unique COMx: assignment. All is well.

My factory uses this USB interface to assign the serial number. The master image has a fixed serial number, so the factory starts with every device appearing the same and being assigned to a particlar COMx: The desire is to have all units with all serials directed to this single COMx: assignment during factory usage. I thought this would be straight forward. I would install a filter on the USB hub such that when the PnP manager was enumerating the device as it was plugged in, I could alter the serial number returned in IRP_MN_QUERY_ID. After experimentation, I found this not to be true and found http://www.osronline.com/showThread.cfm?link=29842
http: stating this is expected.

As filters are not the suggested route to this end, is there any simple way to accomplish my goal I am overlooking ?

I would prefer not to have a unique entry in the registry for each serial number that is ever produced. This knocks out some of the options of involving coinstallers and the registry after standard enumeration. These approaches are also not ideal as I cannot make a server-side {Quiet} install at this time, so these options lead to the new hardware wizard dialogs.

Thanks</http:>

With Regedit, create a BINARY value in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags

The value should be named IgnoreHwSerNumVVVVPPPP where VVVV - your USB vendor ID in hex, and PPPP - your USB product ID in hex. For example, if your vendor ID is 5A5A, and the product ID is A5A5, then the value should be named IgnoreHwSerNumA5A55A5A.

The value should be ONE BYTE with value 01.

Reboot.

You can avoid providing any serial number at all, BTW

time, so these options lead to the new hardware wizard dialogs.

Sign the driver package and these will be gone.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

“Sign the driver package and these will be gone.”

In factory environment, you normally would not want to pollute the registry with thousands of new devnodes enery day.

xxxxx@broadcom.com wrote:

“Sign the driver package and these will be gone.”

The warning dialogs will be gone. The registry entries will still be
created.

In factory environment, you normally would not want to pollute the registry with thousands of new devnodes enery day.

Absolutely. If it were my factory, I’d restore all of the systems from
a master disk image every morning so we started fresh.


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