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

Change advertisement manuf_specific_data once a second

Currently I am set timeout to one second and then on BLE_GAP_EVT_TIMEOUT:

  • modify data
  • advertising_init();
  • advertising_start();

Are there more correct ways to solve this task?

My main concern that ble_advdata_set is not thread safe and if I will modify data and call ble_advdata_set once a second I can send some corrupted packets.

Parents
  • We have data in our advertising packet that needs to be updated once every 10 seconds and another set that updates once per minute. I use ble_advdata_set without stopping advertising and have not observed any issues with data corruption. I can't say I know ble_advdata_set is completely safe, but so far I see no data to say it isn't.

Reply
  • We have data in our advertising packet that needs to be updated once every 10 seconds and another set that updates once per minute. I use ble_advdata_set without stopping advertising and have not observed any issues with data corruption. I can't say I know ble_advdata_set is completely safe, but so far I see no data to say it isn't.

Children
Related