The type of address the stack should use for itself during connection establishment. - BLE_OWN_ADDR_PUBLIC - BLE_OWN_ADDR_RANDOM - BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT - BLE_OWN_ADDR_RPA_RANDOM_DEFAULT
advertising_handle
The advertising_Handle identifying the periodic advertising train Range: 0x00 to 0xEF or 0xFF
subevent
The Subevent parameter is used to identify the subevent where a connection request shall be initiated from a periodic advertising train. The Advertising_Handle and Subevent parameters shall be set to 0xFF if these parameters are not used.
peer_addr
The address of the peer to connect to. If this parameter is NULL, the white list is used.
duration_ms
The duration of the discovery procedure. On expiration, the procedure ends and a BLE_GAP_EVENT_DISC_COMPLETE event is reported. Units are milliseconds.
phy_mask
Define on which PHYs connection attempt should be done
phy_1m_conn_params
Additional 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_params
Additional 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_params
Additional 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.
cb
The 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_arg
The optional argument to pass to the callback function.
Return value
0 on success; BLE_HS_EALREADY if a connection attempt is already in progress; BLE_HS_EBUSY if initiating a connection is not possible because scanning is in progress; BLE_HS_EDONE if the specified peer is already connected; Other nonzero on error.
Examples
ble_gap_connect_with_synced() is referenced by 1 libraries and example projects: