This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52840 DK - Connecting to Windows with x2 different dev boards results in the same COM port being assigned

The issue:

1) Program x2 NRF52840 dev boards 

2) comment board A to windows, windows reports COM n

3) unplug board A and connect board B

4) windows reports the same COM port as board A

5) I have to have x2 boards connected to the same PC in order to test an NRF52840 based product, each board is switched on/off independently so 

 

Is there any way of programming a unique serial number into the NRF52840 Dev board for the USB serial device so windows assign a different Com Port for each device?

Please note I am using the correct port (the one on the side), Serial comms is working OK its just that all boards appear as the same number when connected.

Parents Reply Children
  • There is nothing wrong with the way Windows is behaving. 

    Other USB/Serial devices (like ftdi for example) have usb parameters:

    Vendor ID (VID)

    Product ID (PID)

    Serial Number

    The Nordic Dev board just seems to have:

    Vendor ID

    Product ID

    NO SERIAL NUMBER, therefore no way to uniquely identify one NRF52840 from another. 

    Is there anything in the NRF code which will allow the user to specify a unique Serial Number when programming the device?

  • You proposal of assigning a fixed comm port will not work in this case, as Nordic only provide a Vendor ID and Product ID the same issue exists. 

    1)Connect Device A, its assigned to COM_PORT_USER_SPECIFIED. 

    2)Unplug then connect device B. 

    3)its assigned to COM_PORT_USER_SPECIFIED

    Without a serial number windows will not be able to UNIQUELY assign a port.

  • I have just searched through the Nordic-nrf5-SDK source code and found a header file app_usbd_serial_num_generate.h  but can find anything in the Nordic documentation, Is this what is required?

    /**
    * @defgroup app_usbd_serial_num USBD serial number generator
    * @ingroup app_usbd
    *
    * @brief @tagAPI52840 Generate a standard USB serial number that is unique for each device.
    * @{
    */

    /**@brief Function for generating a default serial number string based on FIRC->DEVICEADDR.
    *
    * After calling this function, the serial number is ready for the USB driver.
    *
    * The generated serial number shows up as a 12-hexidecimal-digit string with no delimiters
    * (e.g 123456ABCDEF). The byte string is also printed on the PCA10059 dongle. It is also used as
    * the default advertising address in the SoftDevice.
    */

    void app_usbd_serial_num_generate(void);

  • @Edvin Have you seen my replies?  For information I called app_usbd_serial_num_generate(void) but it does not create a unique USB serial number.  Just the VID and PID exist when connecting the device as before.  

    Could you confirm if my understanding of this app_usbd_serial_num_generate(void) API is correct?  i.e. calling it should generate a USB Serial number?

  • DaveC said:
    @Edvin Have you seen my replies?

     Yes. Your ticket is put back in the queue when you reply in an existing ticket.

    This has nothing to do with the SDK. The serial COM port doesn't belong to the nRF. It belongs to the programming chip (the large one with the white sticker and a serial number on it. At least that was what I thought. Which USB port on the DK do you use? Do you use the one on the short left hand side, or the one on the long side on the bottom? 

    The one on the left hand side is the one belonging to the programmer, while the bottom one is the nRF's USB port.

    If you use the one on the bottom, which actually belongs to the nRF, what did you program into the nRF before doing so?

    Best regards,

    Edvin

Related