S145 SoftDevice for nRF54L15/nRF54L10/nRF54L05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_adv_set_configure()

uint32_t sd_ble_gap_adv_set_configure ( uint8_t * p_adv_handle,
ble_gap_adv_data_t const * p_adv_data,
ble_gap_adv_params_t const * p_adv_params )

#include <ble_gap.h>

Configure an advertising set. Set, clear or update advertising and scan response data.

Note
To ensure interoperability the advertising data must follow the format defined in Supplement to the Bluetooth Core Specification, Part A, Section 1 Data Types Definitions And Formats.
In order to update advertising data while advertising, new advertising buffers must be provided.
Relevant Message Sequence Charts
Advertising
Whitelist Sharing
Parameters
[in,out]p_adv_handleProvide a pointer to a handle containing BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure a new advertising set. On success, a new handle is then returned through the pointer. Provide a pointer to an existing advertising handle to configure an existing advertising set.
[in]p_adv_dataAdvertising data. If set to NULL, no advertising data will be used. See ble_gap_adv_data_t.
[in]p_adv_paramsAdvertising parameters. When this function is used to update advertising data while advertising, this parameter must be NULL. See ble_gap_adv_params_t.
Return values
NRF_SUCCESSAdvertising set successfully configured.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied:
BLE_ERROR_GAP_INVALID_BLE_ADDRble_gap_adv_params_t::p_peer_addr is invalid.
NRF_ERROR_INVALID_STATEInvalid state to perform operation:
  • It is invalid to provide non-NULL advertising set parameters while advertising.
BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELISTDiscoverable mode and whitelist incompatible.
BLE_ERROR_INVALID_ADV_HANDLEThe provided advertising handle was not found. Use BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure a new advertising handle.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_INVALID_FLAGSInvalid combination of advertising flags supplied.
NRF_ERROR_INVALID_DATAInvalid data type(s) supplied. Check the advertising data format specification given in Bluetooth Core Specification, Vol 3, Part C, Section 11.
NRF_ERROR_INVALID_LENGTHInvalid data length(s) supplied:
  • Provided advertising data length exceeds the maximum allowed length.
  • Provided advertising data length does not fit in the configured advertising interval.
NRF_ERROR_NOT_SUPPORTEDUnsupported data length or advertising parameter configuration.
NRF_ERROR_NO_MEMNot enough memory to configure a new advertising handle. Update an existing advertising handle instead.
BLE_ERROR_GAP_UUID_LIST_MISMATCHInvalid UUID list supplied.