Go to the documentation of this file.
55 #ifndef __BLE_GAPC_H__
56 #define __BLE_GAPC_H__
68 #define BLE_GAP_CHNL_MAP_LEN 0x05
69 #define BLE_GAP_FEATS_LEN 0x08
70 #define BLE_GAP_ADDR_LEN 0x06
71 #define BLE_GAP_INVALID_CONN_INDEX 0xFF
74 #define BLE_GAP_MIN_CTE_LEN 0x02
75 #define BLE_GAP_MAX_CTE_LEN 0x14
78 #define BLE_GAP_MIN_CTE_CNT 0x01
79 #define BLE_GAP_MAX_CTE_CNT 0x10
81 #define BLE_GAP_MIN_IQ_SAMPLE_NUM 0x09
82 #define BLE_GAP_MAX_IQ_SAMPLE_NUM 0x52
84 #define BLE_GAP_MAX_GDX_RANGING_CH 20
@ BLE_GAP_PWR_REMOTE_TX_CHG
@ BLE_GAP_STOPPED_REASON_TIMEOUT
uint8_t max_switching_pattern_len
ble_gap_addr_type_t
The identity address type.
Default Subrate command param.
ble_gap_pwr_lvl_flag_t
Transmit Power level flag.
Path loss threshold reporting info event for BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT.
uint16_t ble_gap_latency_get(uint8_t conn_idx, uint16_t *latency)
Get connection's Latency.
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.
uint16_t continuation_number
RF path compensation values info.
Get broadcast address struct.
Device information data struct.
@ BLE_GAP_OPCODE_LOCAL_RSLV_ADDR_READ
ble_gap_peer_info_t peer_info
Sync established indication.
@ BLE_GAP_REPORT_INFO_DIR_ADV_BIT
#define BLE_GAP_MAX_IQ_SAMPLE_NUM
@ BLE_GAP_ADDR_TYPE_PUBLIC
@ BLE_GAP_OPCODE_PEER_RSLV_ADDR_READ
Connection complete event for BLE_GAPC_EVT_CONNECTED.
ble_gap_peer_features_ind_t peer_features
@ BLE_GAP_STOPPED_REASON_CONN_EST
@ BLE_GAP_REPORT_INFO_CONN_ADV_BIT
ble_gap_stopped_reason_t
Stop reason code.
ble_gapc_set_dev_info_t info
ble_gap_evt_phy_update_t phy_update
Ranging sample report event for BLE_GAPC_EVT_RANGING_SAMPLE_REPORT.
ble_gap_ll_role_type_t ll_role
ble_gap_evt_disconnected_t disconnected
int32_t iq_sample_addr
sample address
ble_gap_antenna_inf_t dev_antenna_inf
ble_gap_dev_rf_path_comp_ind_t dev_rf_path_comp
uint16_t suppted_max_rx_time
Default periodic advertising synchronization transfer parameters.
Disconnection event for BLE_GAPC_EVT_DISCONNECTED.
The Structure for BLE Connection Arrangement.
ble_gap_evt_peer_info_t peer_info
ble_gap_evt_conn_iq_report_t conn_iq_report
Get peer info event for BLE_GAPC_EVT_PEER_INFO_GOT.
@ BLE_GAP_OPCODE_LEPSM_REGISTER
The struct of broadcast address with broadcast type.
ble_gap_dev_info_type_t info_type
ble_gap_phy_type_t
Phy for power control management.
ble_gap_evt_ranging_cmp_ind_t ranging_cmp_ind
Remote transmit power read indication info.
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 ...
Local transmit power read indication info event for BLE_GAPC_EVT_LOCAL_TX_POWER_READ.
ble_gap_evt_path_loss_threshold_report_t path_loss_threshold_reoprt
PHY update event for BLE_GAPC_EVT_PHY_UPDATED.
@ BLE_GAP_CTE_TYPE_AOD_1US
uint16_t ble_subrate_set_host_feature(bool supp_flag)
Set Subrate feature.
uint16_t ble_gap_subrate_request(uint8_t conn_idx, const ble_gap_subrate_req_t *p_subrate_req)
Subrate Request command.
Number of available advertising sets info.
ble_gap_tx_pwr_change_report_reason_t
Transmit power change reporting reason.
uint16_t continuation_num
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.
Name of peer device indication event for BLE_GAPC_EVT_PEER_NAME_GOT.
Ranging complete indication event for BLE_GAPC_EVT_RANGING_CMP_IND.
@ BLE_GAP_STOPPED_REASON_ON_USER
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.
ble_gap_adv_report_info_t
Advertising report information.
ble_gap_evt_tx_pwr_change_report_t tx_pwr_change_report
ble_gap_max_adv_data_len_ind_t max_adv_data_len
ble_gap_evt_peer_name_get_t peer_name
ble_gap_chnl_map_t chnl_map
ble_gap_evt_dev_info_set_t dev_info_ind
Supported data length size Indication.
uint16_t suggted_max_tx_octets
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.
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.
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.
@ BLE_GAP_GET_PEER_FEATURES
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.
Get peer info operation struct.
uint16_t ble_gap_latency_set(uint8_t conn_idx, uint16_t latency)
Set connection's Latency.
ble_gap_disconn_reason_t
The specified reason for terminating a connection.
ble_gap_path_loss_zone_t
Path Loss zones. HCI:7.8.118.
ble_gap_evt_conn_param_update_req_t conn_param_update_req
Set preference slave event duration.
Define the chip configuration.
ble_gap_evt_conn_param_updated_t conn_param_updated
@ BLE_GAP_GET_PEER_VERSION
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_id...
@ BLE_GAP_CTE_TYPE_AOD_2US
Read resolvable address info struct.
uint8_t status
indicate ranging complete status
ble_gap_phy_options_t
The phy options.
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.
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.
ble_gap_dev_adv_tx_power_t adv_tx_power
Get Connection info event for BLE_GAPC_EVT_CONN_INFO_GOT.
@ BLE_GAP_ADDR_TYPE_RANDOM_STATIC
int ble_gap_ranging_start(uint8_t con_idx, ble_gap_ranging_param_t *param)
start ranging procedure.
uint16_t suppted_max_tx_time
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.
Connection complete info.
ble_gap_evt_connected_t connected
@ BLE_GAP_OPCODE_CHNL_MAP_SET
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.
Connection parameter updated event for BLE_GAPC_EVT_CONN_PARAM_UPDATED.
Name of peer device indication.
Path loss threshold reporting info.
uint16_t min_conn_evt_num
@ BLE_GAP_PHY_OPT_S2_CODING
APP receives the extended advertising report indication info struct.
uint16_t nb_sample
sample number
ble_gap_switching_sampling_type_t
Type of switching and sampling slots.
uint16_t supervision_timeout
The parameter of connection.
@ BLE_GAP_OPCODE_PER_ADV_LIST_SET
File that contains error codes.
uint16_t continuation_number
#define BLE_GAP_FEATS_LEN
@ BLE_GAP_PHY_OPT_NO_CODING
@ BLE_GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED
Ranging indication event for BLE_GAPC_EVT_RANGING_IND.
The parameter of update connection.
@ BLE_GAP_GET_CON_CHANNEL_MAP
Subrate change indication.
ble_gap_psm_manager_op_id_t
Operation code used for LEPSM manager.
ble_gap_evt_local_tx_pwr_read_ind_t local_tx_pwr_read
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.
#define BLE_GAP_CHNL_MAP_LEN
Get device info operation struct.
Remote transmit power read indication info event for BLE_GAPC_EVT_REMOTE_TX_POWER_READ.
Set connection CTE Request enable info.
Connection IQ Report info.
Transmit power change reporting info.
ble_gap_dev_tx_power_t dev_tx_power
@ BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF
ble_gap_dev_version_ind_t dev_version
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.
@ BLE_GAP_PWR_LOCAL_TX_CHG
Transmit power change reporting info event for BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT.
ble_gapc_set_dev_info_t info
ble_gap_peer_info_t peer_info
uint16_t ble_gap_update_conn_param_method_set(uint8_t conn_idx, bool use_l2cap_flag)
Set the method for updating connection parameter.
ble_gap_iq_report_status_t
Status of IQ report packet.
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG
uint8_t supp_switching_sampl_rates
ble_gap_adv_report_type_t
Advertising report type.
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT
GAP Device inforamtion write indication.
ble_gap_bdaddr_t broadcaster_addr
ble_gap_dev_info_type_t info_type
ble_gap_get_peer_info_op_t
The operation code used to get peer device info.
@ BLE_GAP_OPCODE_PRIVACY_MODE_SET
#define BLE_GAP_MAX_GDX_RANGING_CH
ble_gap_dev_info_t dev_info
ble_gap_bdaddr_t direct_addr
ble_gap_param_set_op_id_t
Operation code used to set param(s).
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.
@ BLE_GAP_OPCODE_WHITELIST_SET
The struct of device version.
Set connection CTE receive parameters info.
uint8_t channel_num
Number of channel to be collected.
uint16_t supervision_timeout
Connection parameter used to update connection parameters.
The info of connecting operation.
Data Length Updated event for BLE_GAPC_EVT_DATA_LENGTH_UPDATED.
uint16_t ble_gap_conn_cte_rsp_enable_set(uint8_t conn_idx, bool enable_flag)
Set connection CTE response enable.
Connection IQ Report info event for BLE_GAPC_EVT_CONNECT_IQ_REPORT.
ble_gap_evt_ranging_sample_report_ind_t ranging_sample_report
Connectionless IQ Report info.
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.
ble_gap_get_bd_addr_t get_bd_addr
ble_gap_dev_name_ind_t dev_name
ble_gap_ll_role_type_t ll_role
ble_gap_dev_info_type_t
GAP Device inforamtion write indication.
@ BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_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.
BLE GAPC event structure.
ble_gap_evt_connless_iq_report_t connless_iq_report
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 ...
ble_gap_evt_ranging_ind_t ranging_ind
@ BLE_GAP_REPORT_TYPE_ADV_LEG
ble_gap_evt_remote_tx_pwr_read_ind_t remote_tx_pwr_read
Device Information set event for BLE_GAPC_EVT_DEV_INFO_SET.
@ BLE_GAP_GET_CHAN_SEL_ALGO
ble_gap_get_conn_info_op_t
The operation code used to get connection info.
@ BLE_GAPC_DEV_APPEARANCE
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 ...
uint16_t suppted_max_tx_octets
Suggested default data length info.
Set connection CTE transmit parameters info.
Local transmit power read indication info.
Connection parameter update request event for BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ.
ranging sample report info.
Max data length info struct.
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 conne...
@ BLE_GAP_REPORT_TYPE_ADV_EXT
uint16_t ble_gap_disconnect(uint8_t conn_idx)
Terminate an existing connection.
ble_gap_peer_version_ind_t peer_version
@ BLE_GAP_HCI_CONN_INTERVAL_UNACCEPTABLE
ble_gap_cte_type_t
Type of constant tone extension.
uint16_t suppted_max_rx_octets
ble_gap_ll_role_type_t
Device role of LL layer type.
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.
@ BLE_GAP_REPORT_TYPE_PER_ADV
uint16_t ble_gap_conn_param_update_reply(uint8_t conn_idx, bool accept)
Connection param update reply to peer device.
uint16_t cte_req_interval
@ BLE_GAP_PHY_OPT_S8_CODING
ble_gap_rslv_addr_read_op_id_t
Operation code used to read resolvable address.
@ BLE_GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION
uint16_t ble_gap_default_subrate_param_set(const ble_gap_dft_subrate_param_t *p_subrate_param)
Set Default Subrate command.
@ BLE_GAP_INSUFFI_RESOURCE
@ BLE_GAP_HCI_UNSUPPORTED_REMOTE_FEATURE
@ BLE_GAP_HCI_AUTHENTICATION_FAILURE
Subrate change indication event for BLE_GAPC_EVT_SUBRATE_CHANGE_IND.
ble_gap_evt_data_length_t data_length
Maximum advertising data length info.
ble_gap_nb_adv_sets_t nb_adv_sets
@ BLE_GAP_REPORT_INFO_COMPLETE_BIT
uint16_t suggted_max_tx_time
uint8_t status
Status of ranging sample proc.
Set path loss reporting parameter info.
ble_gap_sugg_dflt_data_len_t sugg_dflt_data_len
ble_gap_evt_subrate_chg_ind_t subrate_chg_ind
Subrate Request command param.
@ BLE_GAP_OPCODE_LEPSM_UNREGISTER
ble_gap_max_data_len_t max_data_len
ble_gap_evt_conn_info_t conn_info
@ BLE_GAP_REPORT_INFO_SCAN_ADV_BIT
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.
Connectionless IQ Report info event for BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT.
uint16_t continuation_num