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.
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.
Hi,
You can refer to this post. The main thing to remember is that you cannot update the advertising data buffer that is currently used. Therefore you need to update a new buffer, so typically you will iterate between two buffers if updating the advertising data regularly.
Hi,
You can refer to this post. The main thing to remember is that you cannot update the advertising data buffer that is currently used. Therefore you need to update a new buffer, so typically you will iterate between two buffers if updating the advertising data regularly.
I have followed the post you mentioned but the following
ble_advertising_advdata_update()
function is not found in the sdk 16 please mention its include file or something else.
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.)