ble_gap_ext_connect [experimental]

int
ble_gap_ext_connect(
                             uint8_t  own_addr_type,
                    const ble_addr_t  *peer_addr,
                             int32_t  duration_ms,
                             uint8_t  phy_mask,
    const struct ble_gap_conn_params  *phy_1m_conn_params,
    const struct ble_gap_conn_params  *phy_2m_conn_params,
    const struct ble_gap_conn_params  *phy_coded_conn_params,
                    ble_gap_event_fn  *cb,
                                void  *cb_arg
)

Description

Initiates a connect procedure.

Parameters

ParameterDescription
own_addr_typeThe type of address the stack should use for itself during connection establishment. BLE_ADDR_TYPE_PUBLIC BLE_ADDR_TYPE_RANDOM BLE_ADDR_TYPE_RPA_PUB_DEFAULT BLE_ADDR_TYPE_RPA_RND_DEFAULT
peer_addrThe identity address of the peer to connect to. White list is used when this parameters is set to NULL.
duration_msThe duration of the discovery procedure. On expiration, the procedure ends and a BLE_GAP_EVENT_DISC_COMPLETE event is reported. Units are milliseconds.
phy_maskDefine on which PHYs connection attempt should be done
phy_1m_conn_paramsAdditional arguments specifying the particulars of the connect procedure. When BLE_GAP_LE_PHY_1M_MASK is set in phy_mask this parameter can be specify to null for default values.
phy_2m_conn_paramsAdditional arguments specifying the particulars of the connect procedure. When BLE_GAP_LE_PHY_2M_MASK is set in phy_mask this parameter can be specify to null for default values.
phy_coded_conn_paramsAdditional arguments specifying the particulars of the connect procedure. When BLE_GAP_LE_PHY_CODED_MASK is set in phy_mask this parameter can be specify to null for default values.
cbThe callback to associate with this connect procedure. When the connect procedure completes, the result is reported through this callback. If the connect procedure succeeds, the connection inherits this callback as its event-reporting mechanism.
cb_argThe optional argument to pass to the callback function.

Returned values

ValueCondition
0Success.
Core return codeUnexpected error.