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.

Parameters

ParameterDescription
[in] optionOption for one time advertising. See Advertising options.
[in] advHandleThe advertising handle identifying the advertising set to be enabled.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully starts advertising.
MBA_RES_OOMInternal memory allocation failure occurred.
MBA_RES_INVALID_PARAThe parameters provided are invalid.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed when extended advertising feature is in use.