1.1.2.1.1.4.36 BLE_GAP_SetAdvData

C

uint16_t BLE_GAP_SetAdvData(BLE_GAP_AdvDataParams_T *p_advData);

Description

Set advertising data from the input "p_advData".

Note

If advertising is currently enabled, the new data shall be used in subsequent advertising events. If an advertising event is in progress when this command is issued, the new data may not be used for that event.

This API belongs to legacy advertising feature. It will be disallowed if any one API belongs extended advertising feature is issued before. Categories of advertising APIs and events for details of advertising APIs.

BLE_GAP_AdvInit is required for this API.

Parameters

ParameterDescription
[in] p_advDataPointer to the structure containing advertising data to be set.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully set advertising data.
MBA_RES_OOMInternal memory allocation failure.
MBA_RES_INVALID_PARAInvalid parameters, advertisement data length is more than BLE_GAP_ADV_DATA_LEN.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed when extended Adv. feature is in-use.