6 years, 3 months ago.

How to update advertising payload before transmission?


It seems pretty easy to change the advertising payload, and to set the advertising interval. But is it possible to know when the advertisment is about to be sent and run some code to update the payload before hand?

For example consider a hygrometer that sends the humidity every 5 seconds in the advertising payload. You want to measure it just before you actually send the payload, but I can't see a way to work out when that is.



Question relating to:

High level Bluetooth Low Energy API and radio abstraction layer

Does the measurement need to be in-sync with the advertising or could you just take a reading every X secs and update the payload accordingly. You can update the payload without stopping the advertising.

posted by Andrew Fox 06 May 2016

1 Answer

6 years, 3 months ago.

Hi Tim,

You can do that but only using the Nordic APIs directly.

You will have to use the Radio Notification APIs described in section 7 of the SDS and here:


This will allow you to get notified (via a software interrupt) before the packet goes over the air.

Unfortunately there is no mbed API for this as of now yet.


Accepted Answer