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.
Parameters
Parameter | Description |
---|---|
[in] p_advDataParam | Pointer to a BLE_GAP_PeriAdvDataParams_T structure containing the advertising data. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully sets periodic advertising data. |
MBA_RES_OOM | Internal memory allocation failure occurred. |
MBA_RES_INVALID_PARA | The parameters provided are invalid. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed due to a conflicting operation or state. |
MBA_RES_UNKNOWN_ADV_ID | Unknown advertising identifier. |