BLE_GAP_EnableOneTimeExtAdv
C
uint16_t BLE_GAP_EnableOneTimeExtAdv(uint8_t option, uint8_t advHandle);Description
Starts a one-time extended advertising event.
Note
This API is part of the extended advertising feature set. It will be disallowed if any API from the legacy advertising feature set has been used prior to this call. See Categories of advertising APIs and events for details on advertising APIs. Initialization with BLE_GAP_AdvInit or BLE_GAP_ExtAdvInit is required before calling this API. If the option is set to BLE_GAP_ADV_OPTION_STORE_PARAMS, the APIs BLE_GAP_SetExtAdvParams, BLE_GAP_SetExtAdvData, or BLE_GAP_SetExtScanRspData must be called beforehand to set the appropriate parameters. The combined advertising or scanRsp data length must not be over 230 bytes.
Events generated
BLE_GAP_EVT_ADV_COMPL is generated when one time extended advertising event is completed. If a connection is established, BLE_GAP_EVT_CONNECTED is generated instead of BLE_GAP_EVT_ADV_COMPL.
Parameters
| Parameter | Description |
|---|---|
| [in] option | Option for one time advertising. See Advertising options. |
| [in] advHandle | The advertising handle identifying the advertising set to be enabled. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Successfully starts advertising. |
| MBA_RES_OOM | Internal memory allocation failure occurred. |
| MBA_RES_INVALID_PARA | The parameters provided are invalid. |
| MBA_RES_COMMAND_DISALLOWED | Command disallowed when extended advertising feature is in use. |
