BLE_GAP_SetAdvData

C

uint16_t BLE_GAP_SetAdvData(BLE_GAP_AdvDataParams_T *p_advData);

Description

Sets advertising data from the input "p_advData".

Note

If advertising is currently enabled, the new data will 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 is part of the legacy advertising feature and will be disallowed if any extended advertising feature API has been used prior to this call. See Categories of advertising APIs and events for details on advertising APIs. The BLE_GAP_AdvInit function must be called prior to using this API.

Parameters

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

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully sets advertising data.
MBA_RES_OOMInternal memory allocation failure occurred.
MBA_RES_INVALID_PARAInvalid parameters, if the advertising data length exceeds BLE_GAP_ADV_DATA_LEN.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed when extended advertising feature is in use.