BLE_GAP_CreateConnection

C

uint16_t BLE_GAP_CreateConnection(BLE_GAP_CreateConnParams_T *p_createConnParam);

Description

Initiates a BLE connection to a connectable advertiser.

Note

This API is part of the legacy advertising feature set and will be disallowed if any extended advertising feature API has been used prior to this call. See Categories of advertising APIs and events for advertising API details. Initialization with BLE_GAP_ConnCentralInit is required for this API. is required before using this API.

Parameters

ParameterDescription
[in] p_createConnParamPointer to the structure containing connection parameters. See BLE_GAP_CreateConnParams_T for details..

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully initiates a BLE connection with the specified device.
MBA_RES_OOMInternal memory allocation failure occurred.
MBA_RES_INVALID_PARAInvalid parameters, if any of the connection parameters are out of range. Refer to BLE_GAP_CreateConnParams_T for parameter ranges.
MBA_RES_NO_RESOURCEExceeded the maximum number of concurrent connections.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed due to a conflicting operation or state.