BLE_GAP_SetPeriAdvParams

C

uint16_t BLE_GAP_SetPeriAdvParams(BLE_GAP_PeriAdvParams_T *p_periAdvParams);

Description

Configures periodic advertising parameters.

Note

This API can be called at any time and is part of the extended advertising feature. It is disallowed if any legacy advertising feature API has been issued prior to this call. See Categories of advertising APIs and events for details on advertising APIs. Initialization with BLE_GAP_AdvInit, BLE_GAP_ExtAdvInit, and BLE_GAP_PeriodicAdvInit is required before using this API. If periodic advertising is currently enabled for the specified advertising set, the new data will be used in subsequent periodic advertising events. If a periodic advertising event is in progress when this command is issued, either the old or new data may be used for that event.

Parameters

ParameterDescription
[in] p_periAdvParamsPointer to a BLE_GAP_PeriAdvParams_T structure containing the periodic advertising data.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully sets periodic advertising parameters.
MBA_RES_OOMInternal memory allocation failure occurred.
MBA_RES_INVALID_PARAThe parameters provided are invalid.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed due to a conflicting operation or state.
MBA_RES_UNKNOWN_ADV_IDUnknown advertising identifier.