PORTS Forum
Ports and Interfaces => USB => Topic started 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.
-
One solution is to define a control request to read the serial number.
-
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.