BLE_GAP_SetPeriAdvData

C

uint16_t BLE_GAP_SetPeriAdvData(BLE_GAP_PeriAdvDataParams_T *p_advDataParam);

Description

Sets periodic advertising data.

Note

This API can be called at any time. If periodic advertising is 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. This API is part of the extended advertising feature and is disallowed if any legacy advertising feature API has been used previously. 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.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully sets periodic advertising data.
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.