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

How to add service data in ble_app_beacon code

hello everyone,

I'm using SDK15.2 in nrf52832. I need to update my sensors value(Temperature, Humidity and accelerometer) data to advertising non connectable beacon. How to add sensor data in service data please help how to process this method in my ble_app_beacon code like below image how to implement that. 

Parents
  • Hello,

    The most straightforward approach for updating adv. data is to stop advertising, call advertising_init() again with updated values, then restart advertising by calling advertising_start(). To include service data as in the screenshot, you can modify advertising_init() so it provides a pointer to p_service_data_array similar to how the Manufacturer field is added. 

Reply
  • Hello,

    The most straightforward approach for updating adv. data is to stop advertising, call advertising_init() again with updated values, then restart advertising by calling advertising_start(). To include service data as in the screenshot, you can modify advertising_init() so it provides a pointer to p_service_data_array similar to how the Manufacturer field is added. 

Children
Related