Functions | |
uint16_t | ble_gap_disconnect (uint8_t conn_idx) |
Terminate an existing connection. More... | |
uint16_t | ble_gap_disconnect_with_reason (uint8_t conn_idx, ble_gap_disconn_reason_t reason) |
Terminate an existing connection with a specified reason. More... | |
uint16_t | ble_gap_conn_param_update (uint8_t conn_idx, const ble_gap_conn_update_param_t *p_conn_param) |
Change the Link Layer connection parameters of a connection. More... | |
uint16_t | ble_gap_update_conn_param_method_set (uint8_t conn_idx, bool use_l2cap_flag) |
Set the method for updating connection parameter. More... | |
uint16_t | ble_gap_latency_set (uint8_t conn_idx, uint16_t latency) |
Set connection's Latency. More... | |
uint16_t | ble_gap_latency_get (uint8_t conn_idx, uint16_t *latency) |
Get connection's Latency. More... | |
uint16_t | ble_gap_con_plan_consult (uint8_t *p_act_num, ble_gap_con_plan_tag_t **p_conn_plan_arr) |
Consult BLE connection activity plan situation function. More... | |
uint16_t | ble_gap_conn_param_update_reply (uint8_t conn_idx, bool accept) |
Connection param update reply to peer device. More... | |
uint16_t | ble_gap_data_length_update (uint8_t conn_idx, uint16_t tx_octects, uint16_t tx_time) |
The suggested maximum transmission packet size and maximum packet transmission time to be used for a given connection. More... | |
uint16_t | ble_gap_phy_update (uint8_t conn_idx, uint8_t tx_phys, uint8_t rx_phys, uint8_t phy_opt) |
Set the PHY preferences for the connection identified by the connection index. More... | |
uint16_t | ble_gap_conn_info_get (uint8_t conn_idx, ble_gap_get_conn_info_op_t opcode) |
Get the information of the connection. More... | |
uint16_t | ble_gap_peer_info_get (uint8_t conn_idx, ble_gap_get_peer_info_op_t opcode) |
Get the information of the peer device. More... | |
uint16_t | ble_gap_bond_dev_addr_get (uint8_t conn_idx, ble_gap_bdaddr_t *p_peer_addr) |
Get BD address of the bonded device. More... | |
uint16_t | ble_gap_per_sync_trans_param_set (uint8_t conn_idx, uint8_t per_sync_idx, ble_gap_per_sync_trans_param_t *p_per_sync_trans_param) |
Set the parameters used for periodic sync transfer. More... | |
uint16_t | ble_gap_per_adv_set_info_trans (uint8_t conn_idx, uint8_t per_adv_idx, uint16_t service_data) |
Send synchronization information about the periodic advertising in an advertising set to a connected device. More... | |
uint16_t | ble_gap_per_adv_sync_trans (uint8_t conn_idx, uint8_t per_sync_idx, uint16_t service_data) |
Send synchronization information about the periodic advertising identified by the sync_hdl parameter to a connected device. More... | |
uint16_t | ble_gap_conn_cte_trans_param_set (uint8_t conn_idx, ble_gap_set_conn_cte_trans_param_t *param) |
Set connection CTE transmit parameters. More... | |
uint16_t | ble_gap_conn_cte_recv_param_set (uint8_t conn_idx, ble_gap_set_conn_cte_rcv_param_t *param) |
Set connection CTE receive parameters. More... | |
uint16_t | ble_gap_conn_cte_req_enable_set (uint8_t conn_idx, bool enable_flag, ble_gap_set_conn_cte_req_enable_t *param) |
Set connection CTE request enable. More... | |
uint16_t | ble_gap_conn_cte_rsp_enable_set (uint8_t conn_idx, bool enable_flag) |
Set connection CTE response enable. More... | |
uint16_t | ble_gap_local_tx_pwr_level_read (uint8_t conn_idx, ble_gap_phy_type_t phy) |
Read the local current and maximum transmit power levels for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_remote_tx_pwr_level_read (uint8_t conn_idx, ble_gap_phy_type_t phy) |
Read the remote transmit power levels for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_path_loss_report_parameter_set (uint8_t conn_idx, ble_gap_set_path_loss_report_param_t *param) |
Set the path loss threshold reporting parameters for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_path_loss_report_enable_set (uint8_t conn_idx, bool enable_flag) |
Enable or disable path loss reporting for the connection identified by the conn_idx. More... | |
uint16_t | ble_gap_tx_pwr_change_report_enable_set (uint8_t conn_idx, bool local_enable_flag, bool remote_enable_flag) |
Enable or disable the reporting of transmit power level changes in the local and remote for the connection identified by the conn_idx. More... | |
int | ble_gap_ranging_start (uint8_t con_idx, ble_gap_ranging_param_t *param) |
start ranging procedure. More... | |
void | ble_gap_register_ranging_ind_cb (void(*cb)(uint8_t con_idx, const ble_gap_ranging_ind_t *ind)) |
Register ranging indication event callback. More... | |
void | ble_gap_register_ranging_sample_report_cb (void(*cb)(uint8_t con_idx, const ble_gap_ranging_sample_report_ind_t *ind)) |
Register ranging sample report event callback. More... | |
void | ble_gap_register_ranging_cmp_ind_cb (void(*cb)(uint8_t con_idx, const ble_gap_ranging_cmp_ind_t *ind)) |
Register ranging complete event callback. More... | |
uint16_t | ble_subrate_set_host_feature (bool supp_flag) |
Set Subrate feature. More... | |
uint16_t | ble_gap_default_subrate_param_set (const ble_gap_dft_subrate_param_t *p_subrate_param) |
Set Default Subrate command. More... | |
uint16_t | ble_gap_subrate_request (uint8_t conn_idx, const ble_gap_subrate_req_t *p_subrate_req) |
Subrate Request command. More... | |
void | ble_gap_get_local_addr_by_conidx (uint8_t conidx, uint8_t *p_addr) |
Get BD address of the local device by the conidx. More... | |
uint16_t ble_gap_bond_dev_addr_get | ( | uint8_t | conn_idx, |
ble_gap_bdaddr_t * | p_peer_addr | ||
) |
Get BD address of the bonded device.
[in] | conn_idx | The index of connection. |
[in] | p_peer_addr | Pointer to the peer BD addrss |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
uint16_t ble_gap_con_plan_consult | ( | uint8_t * | p_act_num, |
ble_gap_con_plan_tag_t ** | p_conn_plan_arr | ||
) |
Consult BLE connection activity plan situation function.
[out] | p_act_num | Pointer to the number of existing connection activities. |
[out] | p_conn_plan_arr | Pointer to the global array that stores planned connection activities. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
uint16_t ble_gap_conn_cte_recv_param_set | ( | uint8_t | conn_idx, |
ble_gap_set_conn_cte_rcv_param_t * | param | ||
) |
Set connection CTE receive parameters.
[in] | conn_idx | The index of connection. |
[in] | param | Set connection CTE receive parameters info, see ble_gap_set_conn_cte_rcv_param_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_conn_cte_req_enable_set | ( | uint8_t | conn_idx, |
bool | enable_flag, | ||
ble_gap_set_conn_cte_req_enable_t * | param | ||
) |
Set connection CTE request enable.
[in] | conn_idx | The index of connection. |
[in] | enable_flag | Wheter to request the cte for the connection. If enable_flag is set to false, the param shall be NULL. |
[in] | param | Set connection CTE request enable info, see ble_gap_set_conn_cte_req_enable_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_conn_cte_rsp_enable_set | ( | uint8_t | conn_idx, |
bool | enable_flag | ||
) |
Set connection CTE response enable.
[in] | conn_idx | The index of connection. |
[in] | enable_flag | Wheter to response the cte req for the connection. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_conn_cte_trans_param_set | ( | uint8_t | conn_idx, |
ble_gap_set_conn_cte_trans_param_t * | param | ||
) |
Set connection CTE transmit parameters.
[in] | conn_idx | The index of connection. |
[in] | param | Set connection CTE transmit parameters info, see ble_gap_set_conn_cte_trans_param_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_conn_info_get | ( | uint8_t | conn_idx, |
ble_gap_get_conn_info_op_t | opcode | ||
) |
Get the information of the connection.
[in] | conn_idx | The index of connection. |
[in] | opcode | The operation code. See ble_gap_get_conn_info_op_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_conn_param_update | ( | uint8_t | conn_idx, |
const ble_gap_conn_update_param_t * | p_conn_param | ||
) |
Change the Link Layer connection parameters of a connection.
[in] | conn_idx | The index of connection. |
[in] | p_conn_param | The new connection param. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_conn_param_update_reply | ( | uint8_t | conn_idx, |
bool | accept | ||
) |
Connection param update reply to peer device.
[in] | conn_idx | The index of connection. |
[in] | accept | True to accept connection parameters, false to reject. |
SDK_SUCCESS | Operation is success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_data_length_update | ( | uint8_t | conn_idx, |
uint16_t | tx_octects, | ||
uint16_t | tx_time | ||
) |
The suggested maximum transmission packet size and maximum packet transmission time to be used for a given connection.
[in] | conn_idx | The index of connection. |
[in] | tx_octects | Preferred maximum number of payload octets that the local Controller should include in a single Link Layer packet on this connection. Range 0x001B-0x00FB (all other values reserved for future use). |
[in] | tx_time | Preferred maximum number of microseconds that the local Controller should use to transmit a single Link Layer packet on this connection. Range 0x0148-0x4290 (all other values reserved for future use). |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_default_subrate_param_set | ( | const ble_gap_dft_subrate_param_t * | p_subrate_param | ) |
Set Default Subrate command.
[in] | p_subrate_param | Default subrate param, see ble_gap_dft_subrate_param_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_disconnect | ( | uint8_t | conn_idx | ) |
Terminate an existing connection.
[in] | conn_idx | The index of connection. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_disconnect_with_reason | ( | uint8_t | conn_idx, |
ble_gap_disconn_reason_t | reason | ||
) |
Terminate an existing connection with a specified reason.
[in] | conn_idx | The index of connection. |
[in] | reason | The specified reason. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
void ble_gap_get_local_addr_by_conidx | ( | uint8_t | conidx, |
uint8_t * | p_addr | ||
) |
Get BD address of the local device by the conidx.
[in] | conidx | The index of conncetion. |
[in] | p_addr | Pointer to the local BD addrss |
uint16_t ble_gap_latency_get | ( | uint8_t | conn_idx, |
uint16_t * | latency | ||
) |
Get connection's Latency.
[in] | conn_idx | The index of connection. |
[in] | latency | Pointer to the latency of connection. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_latency_set | ( | uint8_t | conn_idx, |
uint16_t | latency | ||
) |
Set connection's Latency.
[in] | conn_idx | The index of connection. |
[in] | latency | The latency of connection. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_local_tx_pwr_level_read | ( | uint8_t | conn_idx, |
ble_gap_phy_type_t | phy | ||
) |
Read the local current and maximum transmit power levels for the connection identified by the conn_idx.
[in] | conn_idx | The index of connection. |
[in] | phy | Read the transmit power levels on which phy, see ble_gap_phy_type_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_path_loss_report_enable_set | ( | uint8_t | conn_idx, |
bool | enable_flag | ||
) |
Enable or disable path loss reporting for the connection identified by the conn_idx.
[in] | conn_idx | The index of connection. |
[in] | enable_flag | The enable flag for reporting path loss. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_path_loss_report_parameter_set | ( | uint8_t | conn_idx, |
ble_gap_set_path_loss_report_param_t * | param | ||
) |
Set the path loss threshold reporting parameters for the connection identified by the conn_idx.
[in] | conn_idx | The index of connection. |
[in] | param | Set path loss report parameter, see ble_gap_set_path_loss_report_param_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_peer_info_get | ( | uint8_t | conn_idx, |
ble_gap_get_peer_info_op_t | opcode | ||
) |
Get the information of the peer device.
[in] | conn_idx | The index of connection. |
[in] | opcode | The operation code. See ble_gap_get_peer_info_op_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_per_adv_set_info_trans | ( | uint8_t | conn_idx, |
uint8_t | per_adv_idx, | ||
uint16_t | service_data | ||
) |
Send synchronization information about the periodic advertising in an advertising set to a connected device.
[in] | conn_idx | The index of connection. |
[in] | per_adv_idx | The index of per adv. |
[in] | service_data | Identify the periodic advertisement to the peer device. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_per_adv_sync_trans | ( | uint8_t | conn_idx, |
uint8_t | per_sync_idx, | ||
uint16_t | service_data | ||
) |
Send synchronization information about the periodic advertising identified by the sync_hdl parameter to a connected device.
[in] | conn_idx | The index of connection. |
[in] | per_sync_idx | The index of the periodic syncronization instance. |
[in] | service_data | Identify the periodic advertisement to the peer device. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_per_sync_trans_param_set | ( | uint8_t | conn_idx, |
uint8_t | per_sync_idx, | ||
ble_gap_per_sync_trans_param_t * | p_per_sync_trans_param | ||
) |
Set the parameters used for periodic sync transfer.
[in] | conn_idx | The index of connection. |
[in] | per_sync_idx | Periodic synchronization index (range is 0 to 4). |
[in] | p_per_sync_trans_param | Periodic synchronization transfer parameters. |
SDK_SUCCESS | Operation is successful. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_DISALLOWED | Operation is disallowed. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_phy_update | ( | uint8_t | conn_idx, |
uint8_t | tx_phys, | ||
uint8_t | rx_phys, | ||
uint8_t | phy_opt | ||
) |
Set the PHY preferences for the connection identified by the connection index.
[in] | conn_idx | The index of connection. |
[in] | tx_phys | A bit field that indicates the transmitter PHYs that the Host prefers the Controller to use (see ble_gap_phy_type_t). |
[in] | rx_phys | A bit field that indicates the receiver PHYs that the Host prefers the Controller to use (see ble_gap_phy_type_t). |
[in] | phy_opt | A bit field that allows the Host to specify options for PHYs (see ble_gap_phy_options_t). |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
int ble_gap_ranging_start | ( | uint8_t | con_idx, |
ble_gap_ranging_param_t * | param | ||
) |
start ranging procedure.
[in] | con_idx | The index of connection. |
[in] | param | Ranging parameter, see ble_gap_ranging_param_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
void ble_gap_register_ranging_cmp_ind_cb | ( | void(*)(uint8_t con_idx, const ble_gap_ranging_cmp_ind_t *ind) | cb | ) |
Register ranging complete event callback.
[in] | cb | The callback function. |
: | void. |
void ble_gap_register_ranging_ind_cb | ( | void(*)(uint8_t con_idx, const ble_gap_ranging_ind_t *ind) | cb | ) |
Register ranging indication event callback.
[in] | cb | The callback function. |
: | void. |
void ble_gap_register_ranging_sample_report_cb | ( | void(*)(uint8_t con_idx, const ble_gap_ranging_sample_report_ind_t *ind) | cb | ) |
Register ranging sample report event callback.
[in] | cb | The callback function. |
: | void. |
uint16_t ble_gap_remote_tx_pwr_level_read | ( | uint8_t | conn_idx, |
ble_gap_phy_type_t | phy | ||
) |
Read the remote transmit power levels for the connection identified by the conn_idx.
[in] | conn_idx | The index of connection. |
[in] | phy | Read the transmit power levels on which phy, see ble_gap_phy_type_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_subrate_request | ( | uint8_t | conn_idx, |
const ble_gap_subrate_req_t * | p_subrate_req | ||
) |
Subrate Request command.
[in] | conn_idx | The index of conncetion. |
[in] | p_subrate_req | Subrate request param, see ble_gap_subrate_req_t. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gap_tx_pwr_change_report_enable_set | ( | uint8_t | conn_idx, |
bool | local_enable_flag, | ||
bool | remote_enable_flag | ||
) |
Enable or disable the reporting of transmit power level changes in the local and remote for the connection identified by the conn_idx.
[in] | conn_idx | The index of connection. |
[in] | local_enable_flag | The enable flag for reporting transmit power level changes in the local. |
[in] | remote_enable_flag | The enable flag for reporting transmit power level changes in the remote. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_gap_update_conn_param_method_set | ( | uint8_t | conn_idx, |
bool | use_l2cap_flag | ||
) |
Set the method for updating connection parameter.
[in] | conn_idx | Connection index. |
[in] | use_l2cap_flag | Preferred to use l2cap to update connection parameter. |
SDK_SUCCESS | Operation is Success. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_subrate_set_host_feature | ( | bool | supp_flag | ) |
Set Subrate feature.
[in] | supp_flag | support flag. |
SDK_SUCCESS | Operation is Success. |