This group includes connections APIs.
Functions | |
at_ble_status_t | at_ble_conn_update_reply (at_ble_handle_t handle, bool accept, uint16_t ce_len_min, uint16_t ce_len_max) |
Reply to connection parameters update request AT_BLE_CONN_PARAM_UPDATE_REQUEST. More... | |
at_ble_status_t | at_ble_connect (at_ble_addr_t peers[], uint8_t peer_count, uint16_t scan_interval, uint16_t scan_window, at_ble_connection_params_t *connection_params) |
Connect to a peer device. More... | |
at_ble_status_t | at_ble_connect_cancel (void) |
Cancels an ongoing connection attempt. More... | |
at_ble_status_t | at_ble_connection_param_update (at_ble_handle_t handle, at_ble_connection_params_t *connection_params) |
Update the connection parameters of an ongoing connection. More... | |
at_ble_status_t | at_ble_disconnect (at_ble_handle_t handle, at_ble_disconnect_reason_t reason) |
Disconnect a connected peer device and receive response through AT_BLE_DISCONNECTED event. More... | |
at_ble_status_t | at_ble_set_conn_mode (at_ble_conn_mode_t mode) |
Set connection mode parameter. More... | |
at_ble_status_t at_ble_conn_update_reply | ( | at_ble_handle_t | handle, |
bool | accept, | ||
uint16_t | ce_len_min, | ||
uint16_t | ce_len_max | ||
) |
Reply to connection parameters update request AT_BLE_CONN_PARAM_UPDATE_REQUEST.
[in] | handle | handle of the connection to be updated |
[in] | accept | accept or refuse connection parameters proposed by peer slave device |
[in] | ce_len_min | Minimum CE length |
[in] | ce_len_max | Maximum CE length |
Referenced by ble_conn_param_update_req().
at_ble_status_t at_ble_connect | ( | at_ble_addr_t | peers[], |
uint8_t | peer_count, | ||
uint16_t | scan_interval, | ||
uint16_t | scan_window, | ||
at_ble_connection_params_t * | connection_params | ||
) |
Connect to a peer device.
Connecting to a peer device, implicitly starting the necessary scan operation then connecting if a device in the peers list is found in case of using default mode AT_BLE_CONNECTION_AUTO. In case of using AT_BLE_CONNECTION_DIRECT mode, device will try to connect directly to provided peer address only without scanning. This API returns immediately after the operation is programmed, actual connection establishment or failure is marked with AT_BLE_CONNECTED event
[in] | peers | List of peers' addresses that the device will connect to one of them |
[in] | peer_count | Number peers trying to connect with. In case of using AT_BLE_CONNECTION_DIRECT mode, peer_count should be 1. |
[in] | scan_interval | Scan interval in 625us units |
[in] | scan_window | Scan window in 625us units |
[in] | connection_params | Parameters of the established connection |
Referenced by ble_scan_info(), and gap_dev_connect().
at_ble_status_t at_ble_connect_cancel | ( | void | ) |
Cancels an ongoing connection attempt.
at_ble_status_t at_ble_connection_param_update | ( | at_ble_handle_t | handle, |
at_ble_connection_params_t * | connection_params | ||
) |
Update the connection parameters of an ongoing connection.
Connection parameter update command can be used by both master and slave of the connection.
For master of the connection, new connection parameters will be applied immediately.
For slave of the connection, a connection update message request will be send to master. Then master will be able to accept or refuse those parameters within 30 seconds otherwise link is automatically disconnected.
[in] | handle | handle of the connection to be updated |
[in] | connection_params | new parameters to be used |
at_ble_status_t at_ble_disconnect | ( | at_ble_handle_t | handle, |
at_ble_disconnect_reason_t | reason | ||
) |
Disconnect a connected peer device and receive response through AT_BLE_DISCONNECTED event.
[in] | handle | handle of the connection to be terminated |
[in] | reason | disconnection reason, more info at at_ble_disconnect_reason_t |
Referenced by anp_client_discovery_complete_handler(), app_pair_done_event_handler(), ble_connected_state_handler(), ble_encryption_request_handler(), ble_pair_done_handler(), ble_pair_key_request_handler(), ble_resolv_rand_addr_handler(), blp_disconnection(), eddystone_url_frame_send(), fmp_locator_discovery_complete_handler(), hr_sensor_disconnect(), multirole_app_custom_event(), pas_client_discovery_complete_handler(), pxp_monitor_app_button_event(), pxp_monitor_discovery_complete_handler(), time_info_characteristic_read_response(), and time_info_discovery_complete_handler().
at_ble_status_t at_ble_set_conn_mode | ( | at_ble_conn_mode_t | mode | ) |
Set connection mode parameter.
[in] | mode | selected mode, one of at_ble_conn_mode_t |
Referenced by ble_scan_info().