1.2.2.1.1.4.6 BLE_GAP_CreateConnection
C
uint16_t BLE_GAP_CreateConnection(BLE_GAP_CreateConnParams_T *p_createConnParam);
Description
Create a BLE connection to a connectable advertiser.
Note
This API belongs to legacy advertising feature. It will be disallowed if any one API belongs extended advertising feature is issued before. Categories of advertising APIs and events for details of advertising APIs.
BLE_GAP_ConnCentralInit is required for this API.
Events generated
BLE_GAP_EVT_CONNECTED Generated when connection established.
Parameters
Parameter | Description |
---|---|
[in] p_createConnParam | Pointer to connection parameters. See BLE_GAP_CreateConnParams_T. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully created a BLE link with specified device. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_INVALID_PARA | Invalid parameters,if any of the create connection parameters are out of range. See BLE_GAP_CreateConnParams_T for ranges. |
MBA_RES_NO_RESOURCE | Exceed maximum connections. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed. |