1.2.2.1.1.4.50 BLE_GAP_SetExtScanningEnable

C

uint16_t BLE_GAP_SetExtScanningEnable(uint8_t mode, BLE_GAP_ExtScanningEnable_T *p_enable);

Description

Enable or disable extended scanning.

Note

If this API with enable set to true is called while scanning is already enabled, the timers used for duration and period are reset to the new parameter values and a new scan period is started.

The duration of a scan period refers to the time spent scanning on both the primary and secondary advertising physical channels.

If scanning is started and advertising packet or scan response is received then the event BLE_GAP_EVT_EXT_ADV_REPORT is generated.

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_ScanInit and BLE_GAP_ExtScanInit are required for this API.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully enable or disable extended scanning.
MBA_RES_OOMInternal memory allocation failure.
MBA_RES_INVALID_PARAInvalid parameters.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed.