BLE_GAP_CreateSync

C

uint16_t BLE_GAP_CreateSync(BLE_GAP_CreateSync_T *p_periSync);

Description

Synchronizes with a periodic advertising train from an advertiser and begin receiving periodic advertising packets.

Note

This API can be called regardless of the current scanning state. Scanning can be enabled or disabled while this command is pending. However, synchronization can only occur when scanning is enabled. Refer to BLE_GAP_SetExtScanningEnable for more information. This API is part of the extended advertising feature set and is not compatible with legacy advertising APIs. See Categories of advertising APIs and events for details. Initialization with BLE_GAP_ScanInit, BLE_GAP_ExtScanInit, and BLE_GAP_SyncInit is required before using this API.

Parameters

ParameterDescription
[in] p_periSyncPointer to a BLE_GAP_CreateSync_T structure containing synchronization parameters.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully issues a request to synchronize with a periodic advertising train.
MBA_RES_OOMInternal memory allocation failure occurred.
MBA_RES_INVALID_PARAThe parameters provided are invalid.
MBA_RES_CONN_ALREADY_EXISTSConnection already exists.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed due to a conflicting operation or state.