1.2.2.1.1.4.58 BLE_GAP_SetPeriAdvData
C
uint16_t BLE_GAP_SetPeriAdvData(BLE_GAP_PeriAdvDataParams_T *p_advDataParam);
Description
Set periodic advertising data.
Note
This API may be issued at any time. If periodic advertising is currently enabled for the specified advertising set, the new data in subsequent periodic advertising events shall be used for this advertising set. If a periodic advertising event is in progress when this command is issued, the old or new data may be used for that event.
This API belongs to extended advertising feature. It will be disallowed if any one API that belongs to legacy advertising feature is issued before. Categories of advertising APIs and events for details of advertising APIs.
BLE_GAP_AdvInit, BLE_GAP_ExtAdvInit and BLE_GAP_PeriodicAdvInit are required for this API.
Parameters
Parameter | Description |
---|---|
[in] p_advDataParam | Pointer to BLE_GAP_PeriAdvDataParams_T structure buffer. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully set periodic advertising data. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_INVALID_PARA | Invalid parameters. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed. |
MBA_RES_UNKNOWN_ADV_ID | Unknown advertising identifier. |