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

DEVICEID in Advertising Specific Data

Checking if this is possible and how to complete.

For the ble_app_beacon example, I'm able to reuse #define APP_DEVICE_TYPE 0x02, to be #define APP_DEVICE_TYPE 0x0E, 0x06, 0x40, 0x07, and view the new Specific data as hex for the beacon example in NRFconnect

NRF_LOG_INFO("DEVICEID0: %08X\n", NRF_FICR->DEVICEID[0]); returns  DEVICEID0: 0E064007

Question, without hardcoding the device id, how can I set the APP_DEVICE_TYPE to be the value for NRF_FICR->DEVICEID[0])  so that manuf_specific_data can send it?

-thank-you.

Parents
  • Hi,

    Referring to the ble_app_beacon example you will see that those defines are used to initialize the m_beacon_info variable, which is a static array of type uint8_t. You should be able to fill any bytes in that array similarly to how it is done with major_value and minor_value in advertising_init(). There the values are initially fetched from UICR_ADDRESS, defined as 0x10001080 (which is CUSTOMER[0]), but fetching the data from DEVICEID[0] should work the same.

    Regards,
    Terje

Reply
  • Hi,

    Referring to the ble_app_beacon example you will see that those defines are used to initialize the m_beacon_info variable, which is a static array of type uint8_t. You should be able to fill any bytes in that array similarly to how it is done with major_value and minor_value in advertising_init(). There the values are initially fetched from UICR_ADDRESS, defined as 0x10001080 (which is CUSTOMER[0]), but fetching the data from DEVICEID[0] should work the same.

    Regards,
    Terje

Children
Related