1.1.2.1.1.4.17 BLE_GAP_ExtCreateConnection
C
uint16_t BLE_GAP_ExtCreateConnection(uint8_t filterPolicy, BLE_GAP_Addr_T *p_peerAddr, BLE_GAP_ExtCreateConnPhy_T *p_createConnPhy);
Description
Create a BLE connection to a connectable advertiser.
Note
This API belongs to extended advertising feature. It will be disallowed if any one API belongs legacy advertising feature is issued before. Categories of advertising APIs and events for details of advertising APIs.
BLE_GAP_ConnCentralInit and BLE_GAP_ExtConnCentralInit are required for this API.
Events generated
BLE_GAP_EVT_CONNECTED Generated when connection established.
Parameters
Parameter | Description |
---|---|
[in] filterPolicy | This parameter is used to determine whether the filter accept List is used. See Initiator filter policy . |
[in] p_peerAddr | Pointer to the BLE_GAP_Addr_T structure buffer. Remote bluetooth address and address type. |
[in] p_createConnPhy | Pointer to the BLE_GAP_ExtCreateConnPhy_T structure buffer. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully issue the create connection. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_INVALID_PARA | Invalid parameters. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed. |