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

Add Device Information Service in custom_ble_app_template

Hi,
I am working on nRF52840.
I want to add Device Information Service in ble_app_template. (as shown in the attached image its from another device)
How can I add?
Kindly suggest. 
Thanks!

Parents Reply Children
  • Hi Karl,
    I have successfully added all info in Device Info Service but getting issues in the device MAC address.

    Can you please check what I am making mistake?

    Thanks! 

    ble_gap_addr_t ble_addr;
    sd_ble_gap_addr_get(&ble_addr);
    
    
        ble_srv_ascii_to_utf8(&dis_init.p_sys_id, &ble_addr);
        ble_srv_ascii_to_utf8(&dis_init.model_num_str, (char *)MODEL_NUMBER);
        ble_srv_ascii_to_utf8(&dis_init.serial_num_str, (char *)SERIAL_NUMBER);
        ble_srv_ascii_to_utf8(&dis_init.fw_rev_str, (char *)FIRMWARE_NUMBER);
        ble_srv_ascii_to_utf8(&dis_init.hw_rev_str, (char *)HARDWARE_NUMBER);
        ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, (char *)MANUFACTURER_NAME);
    
    

Related