RedBearLab/nRF51822-Arduino

change advertisment data at runtime

Opened this issue · 1 comments

Hi everybody,
I am trying to develop an application that should work as a BLE beacon (sort of) and change advertise data at runtime.

Although I didn't find any info on how to execute this process. Do I have to stop kill the ble thread, change the data, and restart advertise? On the Nordic forum I found a 'set_adv_data' to be executed during a 'radio_notification_callback' but i cannot find the equivalent for the arduino version.

You can just stop the advertising, change it and restart it.
Thats what I had been doing, and it worked fine.

Just change it when you need to change it e.g. when you data changes, don't worry about the radio_notification callback, as I won't know if that works
I couldn't get the callback to work, and if you program using the SDK API directly, they don't require you to change the data in response to that callback, people normally just run a Application Timer and change it in that callback.

BTW. You may want to consider using Sandeep Mistry's repo instead of this RBL one.
It uses a much more recent version of the SoftDevice / SDK / API,