Re-enumeration of USB device which is upgraded from old to new firmware with changes in the descriptor

1.2k Views Asked by At

If I connect a USB device to the host and then upgraded the USB device with a new firmware with changes in the Descriptor of the device. The host will use the old descriptor.

I know that I can force the device to re-enumerate itself by deleting Windows initialized driver for the device etc. or I can bump the ProductId in the descriptor and the device will re-enumerate.

Windows cash the information about the device etc. and thereby windows never ask the device to provide the information again on reconnecting about interfaces, configuration, endpoints, HID descriptor etc.

enter image description here

idProduct - changing this will re-enumerate the device because windows will think its a different device.

iSerialNumber - changing this will re-enumerate because windows need to differentiate between two same idProducts (two of same products connected)

bcdDevice - should do the trick of re-enumeration but it's not working as specified in USB specification.

My question is how can I force Re-enumeration of the USB device without deleting drivers etc. or changing idProduct or iSerialNumber?

Any help will be appreciated...

1

There are 1 best solutions below

0
RamHS On

The solution is to append to iSerial when re-enumeration is required. That is the only solution if changing the PID is a no go.

When the iSerial is appended e.g., from 000000xx -> 000000yy then windows will treat the USB device as a new device and re-initiate the drivers etc.