1.2.2.1.1.4.8 BLE_GAP_CreateSync

C

uint16_t BLE_GAP_CreateSync(BLE_GAP_CreateSync_T *p_periSync);

Description

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

Note

This API may be called whether or not scanning is enabled and scanning may be enabled and disabled while this command is pending. However, synchronization can only occur when scanning is enabled. See BLE_GAP_SetExtScanningEnable.

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

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully issue a request to synchronize with a periodic advertising.
MBA_RES_OOMInternal memory allocation failure.
MBA_RES_INVALID_PARAInvalid parameters.
MBA_RES_CONN_ALREADY_EXISTSConnection already exists.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed.