PORTS Forum

Ports and Interfaces => USB => Topic started by: Rh.owen on November 08, 2012, 08:55:40 am

Title: WinUSB Serial Numbers...
Post by: Rh.owen on November 08, 2012, 08:55:40 am
I am using WinUSB to support a PIC24 based device. It is based around the Microchip highspeed demo application and works quite well so far. I now need to be able to handle more than one device on a single PC and would like to give them unique IDs by including a serial number. Can WinUSB support this? I have tried adding a serial number string to the DeviceDescriptor but that is not enough. In the device properties details page, the Capabilities flags are still only CM_DEVCAP_REMOVABLE. How can I add CM_DEVCAP_UNIQUEID? I cannot even figure out how to read the serial number I have in the descriptor so a hint would be helpful there as well.

Thanks for any help.
Title: Re: WinUSB Serial Numbers...
Post by: Jan Axelson on November 08, 2012, 09:07:14 am
One solution is to define a control request to read the serial number.
Title: Re: WinUSB Serial Numbers...
Post by: Renate on November 23, 2012, 09:58:18 am
It's always a good idea for devices to have unique serial numbers even if you only have one of them.
Under Windows without a unique ID it will "discover" your device and make new registry entries every time you plug it into a different hub port.