Skip to main content
greg_t
Associate III
May 5, 2011 9:13 AM UTC
Question

VCP Demo

Posted on May 05, 2011 at 11:13

VCP Demo

    This topic has been closed for replies.

    5 replies

    tsuneo
    Associate II
    May 17, 2011 12:33 PM UTC
    Posted on May 17, 2011 at 14:33

    Same serial number to each device is not recommended way.

    Rather, no serial number is better.

    When two or more devices of the same serial number of the same VID/PID are connected to single PC at the same time, Windows is confused to identify the devices. It may fail on the second device. For no serial number, Windows identify them at the USB ports to which the devices are plugged in.

    On the Windows side,

    IgnoreHWSerNum registry setting makes Windows ignore the difference of serial number. Instead, Windows see USB port 'location'. With this setting, all your VCP devices are assigned to the same COM port number, as long as they are plugged into the same USB port. 

    Using a registry editor (regedit, etc), 

    Add IgnoreHWSerNum entry under this key, 

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\ 

    The entry name should have VID/PID of the device.

    For a device VID/PID of 0xABCD/0x1234

    IgnoreHWSerNumABCD1234 

    Set its value to 0x01 (REG_BINARY, length must be exactly one byte) 

    IgnoreHWSerNum is helpful for production and testing of USB devices.

    Tsuneo

    Tesla DeLorean
    Guru
    May 17, 2011 12:33 PM UTC
    Posted on May 17, 2011 at 14:33

    At a guess it is using the Unique ID of the STM32 as a USB serial number. The PC will then enumerate each uniquely. Hard code an alternate, constant, serial number.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    greg_t
    greg_tAuthor
    Associate III
    May 17, 2011 12:33 PM UTC
    Posted on May 17, 2011 at 14:33

    Thanks guys - this is very helpful information 

    greg_t
    greg_tAuthor
    Associate III
    Oct 16, 2011 7:51 AM UTC
    Posted on October 16, 2011 at 09:51

    How do I make my device to be without serial mumber ?

    Tesla DeLorean
    Guru
    Oct 16, 2011 1:51 PM UTC
    Posted on October 16, 2011 at 15:51

    As I recall you put a zero in the iSerialNumber field, in the device descriptor

    http://www.beyondlogic.org/usbnutshell/usb5.shtml

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..