nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ ble_adv_data_update()

uint32_t ble_adv_data_update ( struct ble_adv * ble_adv,
const struct ble_adv_data * adv,
const struct ble_adv_data * sr )

#include <ble_adv.h>

Update advertising data.

This function can be called if you wish to reconfigure the advertising data The update will be effective even if advertising has already been started.

Parameters
[in]ble_advAdvertising Module instance.
[in]advPointer to the structure for specifying the content of advertising data. Or null if there should be no advertising data.
[in]srPointer to the structure for specifying the content of scan response data. Or null if there should be no advertising data.
Return values
NRF_SUCCESSIf the operation was successful.
NRF_ERROR_NULLIf ble_adv is null or if both adv and sr are NULL.
NRF_ERROR_INVALID_STATEIf advertising instance was not initialized.
NRF_ERROR_INVALID_ADDRInvalid address.
NRF_ERROR_INVALID_PARAMInvalid parameter provided in the advertising data context.
NRF_ERROR_DATA_SIZEBuffer is too small to encode all data.
Returns
Any error from sd_ble_gap_adv_set_configure on failure.