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
75 #define BLE_GAP_ADDR_TYPE_PUBLIC 0x00
76 #define BLE_GAP_ADDR_TYPE_RANDOM_STATIC 0x01
81 #define BLE_GAP_PHY_OPT_NO_CODING 0x00
82 #define BLE_GAP_PHY_OPT_S2_CODING 0x01
83 #define BLE_GAP_PHY_OPT_S8_CODING 0x02
uint8_t index
Advertsing index.
RF path compensation values info.
Get broadcast address struct.
ble_gap_peer_info_t peer_info
Peer info.
@ BLE_GAP_OPCODE_LEPSM_UNREGISTER
LEPSM unregister operation.
Connection complete event for BLE_GAPC_EVT_CONNECTED.
ble_gap_peer_features_ind_t peer_features
Features info.
ble_gap_addr_t peer_addr
Peer device bd address.
ble_gap_disconn_reason_t
The specified reason for terminating a connection.
ble_gap_evt_phy_update_t phy_update
PHY update parameters.
ble_gap_evt_disconnected_t disconnected
Disconnection parameters.
uint16_t tx_path_comp
RF TX path compensation.
uint16_t length
Maximum advertising data length supported by controller.
uint16_t interval_max
Maximum value for the connection interval.
uint16_t slave_latency
Slave latency for the connection in number of connection events.
ble_gap_dev_rf_path_comp_ind_t dev_rf_path_comp
RF path compensation values.
uint8_t lmp_vers
LMP version.
uint16_t suppted_max_rx_time
Maximum time, in microseconds, that the local Controller supports for reception of a single Link Laye...
uint16_t sup_timeout
Supervision timeout for the LE link.
uint16_t sup_timeout
Connection supervision timeout.
Disconnection event for BLE_GAPC_EVT_DISCONNECTED.
@ BLE_GAP_LL_ROLE_SLAVE
Slave role.
The Structure for BLE Connection Arrangement.
ble_gap_evt_peer_info_t peer_info
Peer info indication parameters.
Get peer info event for BLE_GAPC_EVT_PEER_INFO_GOT.
uint16_t max_rx_time
The maximum time that the local Controller will take to RX.
ble_gap_psm_manager_op_id_t
Operation code used for LEPSM manager.
The struct of broadcast address with broadcast type.
uint16_t hci_subver
HCI subversion.
uint8_t rx_phy
LE PHY for data reception.
PHY update event for BLE_GAPC_EVT_PHY_UPDATED.
uint16_t rx_path_comp
RF RX path compensation.
uint8_t hci_ver
HCI version.
uint16_t interval_min
Minimum value for the connection interval.
@ BLE_GAP_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED
Pairing With Unit Key Not Supported.
Number of available advertising sets info.
Name of peer device indication event for BLE_GAPC_EVT_PEER_NAME_GOT.
@ BLE_GAP_OPCODE_PRIVACY_MODE_SET
Set privacy mode for peer device.
uint16_t lmp_subvers
LMP subversion.
uint32_t interval
Connection Interval (in 625us).
ble_gap_max_adv_data_len_ind_t max_adv_data_len
Maximum advertising data length info.
@ BLE_GAP_GET_CON_RSSI
Get connection RSSI info.
ble_gap_evt_peer_name_get_t peer_name
Peer device name indication parameters.
ble_gap_chnl_map_t chnl_map
channel map.
uint8_t operation
Operation code.
uint16_t suggted_max_tx_octets
The Host's suggested value for the Controller's maximum transmitted number of payload octets to be us...
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.
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.
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.
uint16_t ble_gap_latency_set(uint8_t conn_idx, uint16_t latency)
Set connection's Latency.
uint32_t duration
Connection Duration (in 625us).
ble_gap_evt_conn_param_update_req_t conn_param_update_req
Connection parameter update request parameters.
Set preference slave event duration.
uint16_t conn_idx
Connection Index.
uint8_t peer_addr_type
Peer address type(0x00: Public Device Address, 0x01 : Random Device Address, others: reserved for fut...
Define the chip configuration.
@ BLE_GAP_GET_PEER_VERSION
Get peer device version info.
int8_t max_tx_pwr
MAX of TX power.
ble_gap_evt_conn_param_updated_t conn_param_updated
Connection parameter updated parameters.
uint16_t conn_interval
Connection interval.
ble_gap_param_set_op_id_t
Operation code used to set param(s).
uint8_t host_ver
Host version.
@ BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF
Remote Device Terminated Connection due to Power Off.
ble_gap_dev_adv_tx_power_t adv_tx_power
Advertising TX power info.
@ BLE_GAP_GET_PEER_FEATURES
Get peer device features info.
uint16_t interval_min
Minimum value for the connection interval.
Get Connection info event for BLE_GAPC_EVT_CONN_INFO_GOT.
uint16_t suppted_max_tx_time
Maximum time, in microseconds, that the local Controller supports for transmission of a single Link L...
ble_gap_evt_connected_t connected
Connection parameters.
@ BLE_GAP_OPCODE_WHITELIST_SET
Set white list.
uint16_t max_tx_octets
The maximum number of payload octets in TX.
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.
uint16_t max_rx_octets
The maximum number of payload octets in RX.
@ BLE_GAP_HCI_CONN_INTERVAL_UNACCEPTABLE
Unacceptable Connection Parameters.
@ BLE_GAP_GET_PHY
Get connection PHY.
uint16_t interval_max
Maximum value for the connection interval.
uint16_t slave_latency
Slave latency for the connection in number of connection events.
uint16_t slave_latency
Latency for the connection in number of connection events.
ble_gap_dev_info_t dev_info
Device info.
uint8_t addr_type
Address type of the device: 0=public/1=random.
The parameter of connection.
@ BLE_GAP_OPCODE_LEPSM_REGISTER
LEPSM register operation.
@ BLE_GAP_LL_ROLE_MASTER
Master role.
File that contains error codes.
#define BLE_GAP_FEATS_LEN
The length of features.
The parameter of update connection.
@ BLE_GAP_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES
Remote Device Terminated Connection due to Low Resources .
#define BLE_GAP_CHNL_MAP_LEN
The length of channel map.
uint8_t reason
HCI error code, see BLE_HCI_STATUS_CODES.
ble_gap_addr_t peer_addr
Peer BT address.
uint8_t clk_accuracy
Clock accuracy (0x00: 500 ppm, 0x01: 250 ppm, 0x02: 150 ppm, 0x03: 100 ppm, 0x04: 75 ppm,...
uint8_t opcode
Operation code.
uint16_t sup_timeout
Supervision timeout for the LE link.
uint16_t sup_timeout
Supervision timeout for the LE link.
@ BLE_GAP_HCI_AUTHENTICATION_FAILURE
Authentication Failure.
ble_gap_dev_tx_power_t dev_tx_power
Device TX power info.
ble_gap_dev_version_ind_t dev_version
Version info.
uint16_t manuf_name
Manufacturer name.
@ BLE_GAP_OPCODE_PER_ADV_LIST_SET
Set periodic advertising list.
uint8_t chan_sel_algo
Chanel Selection algorithm, 0x00: LE Channel Selection Algorithm #1 is used.
uint16_t conn_interval
Connection interval.
#define BLE_GAP_ADDR_LEN
The length of address.
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.
The struct of device version.
Data Length Updated event for BLE_GAPC_EVT_DATA_LENGTH_UPDATED.
ble_gap_bdaddr_t bd_addr
BD address.
uint16_t slave_latency
Slave latency for the connection in number of connection events.
ble_gap_le_phy_ind_t phy
PHY indicaiton.
ble_gap_get_bd_addr_t get_bd_addr
Device BD address info.
ble_gap_ll_role_type_t ll_role
Device Role of LL Layer.
ble_gap_get_peer_info_op_t
The operation code used to get peer device info.
BLE GAPC event structure.
uint8_t tx_phy
LE PHY for data transmission.
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 ...
uint16_t compid
Manufacturer name.
@ BLE_GAP_GET_CHAN_SEL_ALGO
Get selection algorithm for connection channel.
uint32_t offset
Connection Offset (in 625us).
ble_gap_ll_role_type_t
Device role of LL layer type.
int8_t min_tx_pwr
MIN of TX power.
uint8_t * name
Peer device name.
uint8_t lmp_ver
LMP version.
@ BLE_GAP_HCI_REMOTE_USER_TERMINATED_CONNECTION
Remote User Terminated Connection.
uint16_t slave_latency
Latency for the connection in number of connection events.
uint16_t max_tx_time
The maximum time that the local Controller will take to TX.
uint16_t host_subver
Host subversion.
uint8_t opcode
Operation code.
uint16_t suppted_max_tx_octets
Maximum number of payload octets that the local Controller supports for transmission of a single Link...
uint16_t interval_max
Maximum value for the connection interval.
uint8_t nb_adv_sets
Number of available advertising sets.
Suggested default data length info.
@ BLE_GAP_GET_CON_CHANNEL_MAP
Get connection channel map.
uint16_t interval_min
Minimum value for the connection interval.
Connection parameter update request event for BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ.
uint8_t tx_phy
LE PHY for data transmission.
Max data length info struct.
uint16_t ble_gap_disconnect(uint8_t conn_idx)
Terminate an existing connection.
uint16_t sup_timeout
Supervision timeout for the LE link.
ble_gap_peer_version_ind_t peer_version
Version info.
uint16_t suppted_max_rx_octets
Maximum number of payload octets that the local Controller supports for reception of a single Link La...
uint8_t single_tx
Slave transmits a single packet per connection event (False/True).
ble_gap_conn_info_t info
Connection info.
@ BLE_GAP_HCI_UNSUPPORTED_REMOTE_FEATURE
Unsupported Remote Feature.
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_addr_t gap_addr
Device BD Address.
@ BLE_GAP_OPCODE_CHNL_MAP_SET
Set Channel Map.
uint16_t ble_gap_conn_param_update_reply(uint8_t conn_idx, bool accept)
Connection param update reply to peer device.
ble_gap_get_conn_info_op_t
The operation code used to get connection info.
Get device info event for BLE_GAPC_EVT_DEV_INFO_GOT.
int8_t power_lvl
Advertising channel TX power level.
ble_gap_evt_data_length_t data_length
Data Length Update parameter.
Maximum advertising data length info.
uint8_t addr_type
Peer device address type.
ble_gap_nb_adv_sets_t nb_adv_sets
Number of available advertising sets.
uint8_t index
Index of connection.
uint16_t suggted_max_tx_time
The Host's suggested value for the Controller's maximum packet transmission time to be used for new c...
uint16_t ce_len
The length of connection event needed for this LE connection.
ble_gap_sugg_dflt_data_len_t sugg_dflt_data_len
Suggested default data length info.
uint16_t duration
Preferred event duration.
uint8_t rx_phy
LE PHY for data reception.
ble_gap_max_data_len_t max_data_len
Suggested MAX data length info.
uint16_t conn_handle
Connection_Handle.
ble_gap_evt_conn_info_t conn_info
Connection info parameters.
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.
uint8_t name_len
Peer device name length.
uint16_t lmp_subver
LMP subversion.