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

nRF52840 change USBD Serial Number

Hi,

I'm using the USBD for HID keyboard on my nRF52840 and I'm trying to change the serial number. On my PC (Linux) the Serial number always appears as 0 using lsusb -v. Checking it on windows 10 the Serial number is blank.

I followed the instructions here: https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_usbd_string_desc.html

Setting EXTERNAL 1 and creating my own descriptor did not work. I've also tried to modify the default SERIAL string (change one character to '1') without any result.

Furthermore I also tried to use the function: app_usbd_serial_num_generate(), still the Serial number comes up as 0 or blank depending on operating system.

One observation is that the USBD Hid appears with the name "Holtek Semiconductor" and not "Nordic Semiconductor" which is specified in the app_usbd_string_config.h file. It seems like it USBD doesnt use the configuration inside the app_usbd_string_config.h.

HW: nRF52840 PCA10056

SDK: v15.0

Softdevice: S140 V6.0

Br,
Anton

Parents
  • Hi Anton, 

    I'm using the USBD for HID keyboard on my nRF52840 and I'm trying to change the serial number.

     Can you please specify which example you are using? Just so I can try to reproduce.

    One observation is that the USBD Hid appears with the name "Holtek Semiconductor" and not "Nordic Semiconductor" which is specified in the app_usbd_string_config.h file.

     Where did Holtek Semiconductor come from? Is this something you've added?

    Thanks,
    Øyvind

  • Hi Öyvind,

     Can you please specify which example you are using? Just so I can try to reproduce.

    My project is based on examples/peripheral/usbd_hid_composite (Everything regarding HID mouse is removed)

     Where did Holtek Semiconductor come from? Is this something you've added?

    I have no idea honestly, I have checked the config folder where the "app_usbd_string_config.h" file is located. And it clearly says "Nordic Semiconductor".

    Here is the output from lsusb -v

    bus 001 device 007: id 04d9:0295 holtek semiconductor, inc.                     
    1389 device descriptor:                                                              
    1390   blength                18                                                     
    1391   bdescriptortype         1                                                     
    1392   bcdusb               2.00                                                     
    1393   bdeviceclass            0 (defined at interface level)                        
    1394   bdevicesubclass         0                                                     
    1395   bdeviceprotocol         0                                                     
    1396   bmaxpacketsize0        64                                                     
    1397   idvendor           0x04d9 holtek semiconductor, inc.                          
    1398   idproduct          0x0295                                                     
    1399   bcddevice            2.07                                                     
    1400   imanufacturer           0                                                     
    1401   iproduct                1 usb-hid keyboard                                    
    1402   iserial                 0                                                     
    1403   bnumconfigurations      1    

  • AntonHellbe said:
    I have no idea honestly, I have checked the config folder where the "app_usbd_string_config.h" file is located. And it clearly says "Nordic Semiconductor".

     Are you sure that you are looking at the correct device? What type of keyboard are you using on your computer?

    The VID and PID do not match ours at all. 

    From sdk_config.h

    // <i> Vendor ID ordered from USB IF: http://www.usb.org/developers/vendor/
    #ifndef APP_USBD_VID
    #define APP_USBD_VID 0x1915
    #endif
    
    // <s> APP_USBD_PID - Product ID
    
    // <i> Selected Product ID
    #ifndef APP_USBD_PID
    #define APP_USBD_PID 0x520B
    #endif

    Ref: http://www.linux-usb.org/usb.ids

  • Hi,

    You are correct, I was looking at the wrong device. So I guess the problem is that the USBD HID does not appear as a device at all. The only thing that appears when i plug in the devkit is the standard "SEGGER J-Link"

  • What USB connector are you using to connect the board? nRF USB I presume? 

    There is a bug in the documentation for SDK15.0 which does not state what USB should be connected:'

    SDK15.0

    vs SDK15.3




Reply Children
Related