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

How to update advertisement packet manufacturer specific data at run time in SDK 16;

I want to update status in manufacturer specific data of advertisement packet. is there necessary to stop advertising first then reinitialize advertisement data and again start advertisement, please guide with code snippet.

Parents Reply Children
  • Hi,

    The function ble_advertising_advdata_update() is part of the advertising module, which is also used in SDK 16 (<SDK>\components\ble\ble_advertising\ble_advertising.h). If you use the advertising module (which is used by most BLE peripheral examples in the SDK), then using this function makes the most sense. If you use SDK 16 and the advertising module, then you don't need to think about having two advertising buffers, since that is handled for you by the module (not the case for SDK 15).

    (Alternatively, if you do not use the advertising module, you need to either stop, reconfigure and start advertising. Or to update without stopping and starting, lternate between two buffers and call sd_ble_gap_adv_set_configure() with NULL as the third parameter to update the advertising data on the fly.)

Related