This blog is to show how to modify the advertising payload from time to time instead of stop / restart the advertising module.

This demo is based on the SDK 14.2 / S132v5.1 with nRF52832 DK. The idea is to use pointer of the global buffer for the advertising data and scan response data. And then it sets to the softdevice API. Also, this example is to use the softdevice API instead of using the ble_advertising module in order to save the code and ram usage.

Advertising Payload

  • Manufacturer Specific Data (including battery value, MAC Address, RSSI value, other)

Scan Response Payload

  • 128 UUID + Device Name (Max length = 11 bytes)
Advertising Payload
Scan Response Payload
Start the Advertising

By a regular app_timer for update the advertising payload, here is the example how to change the MAC address inside the manufacturer specific data payload.

Welcome to give any comment and suggestion!!