|
| #define | BT_LE_CONN_PARAM_INIT(int_min, int_max, lat, to) |
| | Initialize connection parameters.
|
| #define | BT_LE_CONN_PARAM(int_min, int_max, lat, to) |
| | Helper to declare connection parameters inline.
|
| #define | BT_LE_CONN_PARAM_DEFAULT |
| | Default LE connection parameters: Connection Interval: 30-50 ms Latency: 0 Timeout: 4 s.
|
| #define | BT_CONN_LE_PHY_PARAM_INIT(_pref_tx_phy, _pref_rx_phy) |
| | Initialize PHY parameters.
|
| #define | BT_CONN_LE_PHY_PARAM(_pref_tx_phy, _pref_rx_phy) |
| | Helper to declare PHY parameters inline.
|
| #define | BT_CONN_LE_PHY_PARAM_1M |
| | Only LE 1M PHY.
|
| #define | BT_CONN_LE_PHY_PARAM_2M |
| | Only LE 2M PHY.
|
| #define | BT_CONN_LE_PHY_PARAM_CODED |
| | Only LE Coded PHY.
|
| #define | BT_CONN_LE_PHY_PARAM_ALL |
| | All LE PHYs.
|
| #define | BT_CONN_LE_DATA_LEN_PARAM_INIT(_tx_max_len, _tx_max_time) |
| | Initialize transmit data length parameters.
|
| #define | BT_CONN_LE_DATA_LEN_PARAM(_tx_max_len, _tx_max_time) |
| | Helper to declare transmit data length parameters inline.
|
| #define | BT_LE_DATA_LEN_PARAM_DEFAULT |
| | Default LE data length parameters.
|
| #define | BT_LE_DATA_LEN_PARAM_MAX |
| | Maximum LE data length parameters.
|
| #define | BT_CONN_LE_MAX_CONN_INTERVAL_GROUPS 41 |
| | Maximum Connection Interval Groups possible.
|
| #define | BT_CONN_LE_FRAME_SPACE_TYPES_MASK_ACL_IFS |
| #define | BT_CONN_LE_FRAME_SPACE_TYPES_MASK_ACL |
| #define | BT_CONN_LE_FRAME_SPACE_TYPES_MASK_CIS |
| #define | BT_CONN_LE_FRAME_SPACE_MAX (10000U) |
| | Maximum frame space in microseconds.
|
| #define | BT_CONN_LE_CS_MODE_MAIN_MODE_PART(x) |
| | Extract main mode part from bt_conn_le_cs_mode.
|
| #define | BT_CONN_LE_CS_MODE_SUB_MODE_PART(x) |
| | Extract sub-mode part from bt_conn_le_cs_mode.
|
| #define | BT_CONN_INTERVAL_TO_MS(interval) |
| | Convert connection interval to milliseconds.
|
| #define | BT_CONN_INTERVAL_TO_US(interval) |
| | Convert connection interval to microseconds.
|
| #define | BT_CONN_SCI_INTERVAL_TO_US(_interval) |
| | Convert shorter connection interval to microseconds.
|
| #define | bt_conn_dst_str(_conn) |
| | Get a string pointer to a connection destination (peer) address.
|
| #define | BT_CONN_LE_CREATE_PARAM_INIT(_options, _interval, _window) |
| | Initialize create connection parameters.
|
| #define | BT_CONN_LE_CREATE_PARAM(_options, _interval, _window) |
| | Helper to declare create connection parameters inline.
|
| #define | BT_CONN_LE_CREATE_CONN |
| | Default LE create connection parameters.
|
| #define | BT_CONN_LE_CREATE_CONN_AUTO |
| | Default LE create connection using filter accept list parameters.
|
| #define | BT_CONN_PARAM_REJECT_ERR_L2CAP_CPUP 0xFF |
| | Synthetic error value for an L2CAP Connection Parameter Update Procedure (CPUP) rejection.
|
| #define | BT_CONN_CB_DEFINE(_name) |
| | Register a callback structure for connection events.
|
| #define | BT_PASSKEY_RAND 0xffffffff |
| | Special passkey value that can be used to generate a random passkey when using the app_passkey callback from bt_conn_auth_cb.
|
| #define | BT_BR_CONN_PARAM_INIT(role_switch) |
| #define | BT_BR_CONN_PARAM(role_switch) |
| #define | BT_BR_CONN_PARAM_DEFAULT BT_BR_CONN_PARAM(true) |
|
| enum | { BT_CONN_LE_PHY_OPT_NONE = 0
, BT_CONN_LE_PHY_OPT_CODED_S2 = BIT(0)
, BT_CONN_LE_PHY_OPT_CODED_S8 = BIT(1)
} |
| | Connection PHY options. More...
|
| enum | bt_conn_le_frame_space_update_initiator { BT_CONN_LE_FRAME_SPACE_UPDATE_INITIATOR_LOCAL_HOST
, BT_CONN_LE_FRAME_SPACE_UPDATE_INITIATOR_LOCAL_CONTROLLER
, BT_CONN_LE_FRAME_SPACE_UPDATE_INITIATOR_PEER
} |
| | Frame space update initiator. More...
|
| enum | bt_conn_type {
BT_CONN_TYPE_LE = BIT(0)
, BT_CONN_TYPE_BR = BIT(1)
, BT_CONN_TYPE_SCO = BIT(2)
, BT_CONN_TYPE_ISO = BIT(3)
,
BT_CONN_TYPE_ALL
} |
| | Connection Type. More...
|
| enum | bt_conn_le_cs_capability_rtt_aa_only { BT_CONN_LE_CS_RTT_AA_ONLY_NOT_SUPP = 0
, BT_CONN_LE_CS_RTT_AA_ONLY_10NS
, BT_CONN_LE_CS_RTT_AA_ONLY_150NS
} |
| | Supported AA-Only RTT precision. More...
|
| enum | bt_conn_le_cs_capability_rtt_sounding { BT_CONN_LE_CS_RTT_SOUNDING_NOT_SUPP = 0
, BT_CONN_LE_CS_RTT_SOUNDING_10NS
, BT_CONN_LE_CS_RTT_SOUNDING_150NS
} |
| | Supported Sounding Sequence RTT precision. More...
|
| enum | bt_conn_le_cs_capability_rtt_random_payload { BT_CONN_LE_CS_RTT_RANDOM_PAYLOAD_NOT_SUPP = 0
, BT_CONN_LE_CS_RTT_RANDOM_PAYLOAD_10NS
, BT_CONN_LE_CS_RTT_RANDOM_PAYLOAD_150NS
} |
| | Supported Random Payload RTT precision. More...
|
| enum | bt_conn_le_cs_mode {
BT_CONN_LE_CS_MAIN_MODE_1_NO_SUB_MODE = BT_HCI_OP_LE_CS_MAIN_MODE_1
, BT_CONN_LE_CS_MAIN_MODE_2_NO_SUB_MODE = BT_HCI_OP_LE_CS_MAIN_MODE_2
, BT_CONN_LE_CS_MAIN_MODE_3_NO_SUB_MODE = BT_HCI_OP_LE_CS_MAIN_MODE_3
, BT_CONN_LE_CS_MAIN_MODE_2_SUB_MODE_1
,
BT_CONN_LE_CS_MAIN_MODE_2_SUB_MODE_3
, BT_CONN_LE_CS_MAIN_MODE_3_SUB_MODE_2
} |
| | Channel sounding mode (main and sub-mode). More...
|
| enum | bt_conn_le_cs_role { BT_CONN_LE_CS_ROLE_INITIATOR
, BT_CONN_LE_CS_ROLE_REFLECTOR
} |
| | Channel sounding role. More...
|
| enum | bt_conn_le_cs_rtt_type {
BT_CONN_LE_CS_RTT_TYPE_AA_ONLY = BT_HCI_OP_LE_CS_RTT_TYPE_AA_ONLY
, BT_CONN_LE_CS_RTT_TYPE_32_BIT_SOUNDING = BT_HCI_OP_LE_CS_RTT_TYPE_32BIT_SOUND
, BT_CONN_LE_CS_RTT_TYPE_96_BIT_SOUNDING = BT_HCI_OP_LE_CS_RTT_TYPE_96BIT_SOUND
, BT_CONN_LE_CS_RTT_TYPE_32_BIT_RANDOM = BT_HCI_OP_LE_CS_RTT_TYPE_32BIT_RAND
,
BT_CONN_LE_CS_RTT_TYPE_64_BIT_RANDOM = BT_HCI_OP_LE_CS_RTT_TYPE_64BIT_RAND
, BT_CONN_LE_CS_RTT_TYPE_96_BIT_RANDOM = BT_HCI_OP_LE_CS_RTT_TYPE_96BIT_RAND
, BT_CONN_LE_CS_RTT_TYPE_128_BIT_RANDOM = BT_HCI_OP_LE_CS_RTT_TYPE_128BIT_RAND
} |
| | Channel sounding RTT type. More...
|
| enum | bt_conn_le_cs_sync_phy { BT_CONN_LE_CS_SYNC_1M_PHY = BT_HCI_OP_LE_CS_CS_SYNC_1M
, BT_CONN_LE_CS_SYNC_2M_PHY = BT_HCI_OP_LE_CS_CS_SYNC_2M
, BT_CONN_LE_CS_SYNC_2M_2BT_PHY = BT_HCI_OP_LE_CS_CS_SYNC_2M_2BT
} |
| | Channel sounding PHY used for CS sync. More...
|
| enum | bt_conn_le_cs_chsel_type { BT_CONN_LE_CS_CHSEL_TYPE_3B = BT_HCI_OP_LE_CS_TEST_CHSEL_TYPE_3B
, BT_CONN_LE_CS_CHSEL_TYPE_3C = BT_HCI_OP_LE_CS_TEST_CHSEL_TYPE_3C
} |
| | Channel sounding channel selection type. More...
|
| enum | bt_conn_le_cs_ch3c_shape { BT_CONN_LE_CS_CH3C_SHAPE_HAT = BT_HCI_OP_LE_CS_TEST_CH3C_SHAPE_HAT
, BT_CONN_LE_CS_CH3C_SHAPE_X = BT_HCI_OP_LE_CS_TEST_CH3C_SHAPE_X
} |
| | Channel sounding channel sequence shape. More...
|
| enum | bt_conn_le_cs_procedure_done_status { BT_CONN_LE_CS_PROCEDURE_COMPLETE = BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_COMPLETE
, BT_CONN_LE_CS_PROCEDURE_INCOMPLETE = BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_PARTIAL
, BT_CONN_LE_CS_PROCEDURE_ABORTED = BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_ABORTED
} |
| | Procedure done status. More...
|
| enum | bt_conn_le_cs_subevent_done_status { BT_CONN_LE_CS_SUBEVENT_COMPLETE = BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_COMPLETE
, BT_CONN_LE_CS_SUBEVENT_ABORTED = BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_ABORTED
} |
| | Subevent done status. More...
|
| enum | bt_conn_le_cs_procedure_abort_reason {
BT_CONN_LE_CS_PROCEDURE_NOT_ABORTED = BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_NO_ABORT
, BT_CONN_LE_CS_PROCEDURE_ABORT_REQUESTED
, BT_CONN_LE_CS_PROCEDURE_ABORT_TOO_FEW_CHANNELS
, BT_CONN_LE_CS_PROCEDURE_ABORT_CHMAP_INSTANT_PASSED
,
BT_CONN_LE_CS_PROCEDURE_ABORT_UNSPECIFIED = BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_UNSPECIFIED
} |
| | Procedure abort reason. More...
|
| enum | bt_conn_le_cs_subevent_abort_reason {
BT_CONN_LE_CS_SUBEVENT_NOT_ABORTED = BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_NO_ABORT
, BT_CONN_LE_CS_SUBEVENT_ABORT_REQUESTED
, BT_CONN_LE_CS_SUBEVENT_ABORT_NO_CS_SYNC
, BT_CONN_LE_CS_SUBEVENT_ABORT_SCHED_CONFLICT
,
BT_CONN_LE_CS_SUBEVENT_ABORT_UNSPECIFIED = BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_UNSPECIFIED
} |
| | Subevent abort reason. More...
|
| enum | { BT_CONN_ROLE_CENTRAL = 0
, BT_CONN_ROLE_PERIPHERAL = 1
} |
| enum | bt_conn_state { BT_CONN_STATE_DISCONNECTED
, BT_CONN_STATE_CONNECTING
, BT_CONN_STATE_CONNECTED
, BT_CONN_STATE_DISCONNECTING
} |
| enum | bt_security_t {
BT_SECURITY_L0
, BT_SECURITY_L1
, BT_SECURITY_L2
, BT_SECURITY_L3
,
BT_SECURITY_L4
, BT_SECURITY_FORCE_PAIR = BIT(7)
} |
| | Security level. More...
|
| enum | bt_security_flag { BT_SECURITY_FLAG_SC = BIT(0)
, BT_SECURITY_FLAG_OOB = BIT(1)
} |
| | Security Info Flags. More...
|
| enum | bt_conn_le_tx_power_phy {
BT_CONN_LE_TX_POWER_PHY_NONE
, BT_CONN_LE_TX_POWER_PHY_1M
, BT_CONN_LE_TX_POWER_PHY_2M
, BT_CONN_LE_TX_POWER_PHY_CODED_S8
,
BT_CONN_LE_TX_POWER_PHY_CODED_S2
} |
| enum | bt_conn_le_path_loss_zone { BT_CONN_LE_PATH_LOSS_ZONE_ENTERED_LOW
, BT_CONN_LE_PATH_LOSS_ZONE_ENTERED_MIDDLE
, BT_CONN_LE_PATH_LOSS_ZONE_ENTERED_HIGH
, BT_CONN_LE_PATH_LOSS_ZONE_UNAVAILABLE
} |
| | Path Loss zone that has been entered. More...
|
| enum | bt_conn_auth_keypress {
BT_CONN_AUTH_KEYPRESS_ENTRY_STARTED = 0x00
, BT_CONN_AUTH_KEYPRESS_DIGIT_ENTERED = 0x01
, BT_CONN_AUTH_KEYPRESS_DIGIT_ERASED = 0x02
, BT_CONN_AUTH_KEYPRESS_CLEARED = 0x03
,
BT_CONN_AUTH_KEYPRESS_ENTRY_COMPLETED = 0x04
} |
| | Passkey Keypress Notification type. More...
|
| enum | { BT_CONN_LE_OPT_NONE = 0
, BT_CONN_LE_OPT_CODED = BIT(0)
, BT_CONN_LE_OPT_NO_1M = BIT(1)
} |
| enum | bt_security_err {
BT_SECURITY_ERR_SUCCESS
, BT_SECURITY_ERR_AUTH_FAIL
, BT_SECURITY_ERR_PIN_OR_KEY_MISSING
, BT_SECURITY_ERR_OOB_NOT_AVAILABLE
,
BT_SECURITY_ERR_AUTH_REQUIREMENT
, BT_SECURITY_ERR_PAIR_NOT_SUPPORTED
, BT_SECURITY_ERR_PAIR_NOT_ALLOWED
, BT_SECURITY_ERR_INVALID_PARAM
,
BT_SECURITY_ERR_KEY_REJECTED
, BT_SECURITY_ERR_UNSPECIFIED
} |
| enum | bt_conn_le_cs_procedure_enable_state { BT_CONN_LE_CS_PROCEDURES_DISABLED = BT_HCI_OP_LE_CS_PROCEDURES_DISABLED
, BT_CONN_LE_CS_PROCEDURES_ENABLED = BT_HCI_OP_LE_CS_PROCEDURES_ENABLED
} |
| enum | bt_conn_le_cs_tone_antenna_config_selection {
BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B1 = BT_HCI_OP_LE_CS_ACI_0
, BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A2_B1 = BT_HCI_OP_LE_CS_ACI_1
, BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A3_B1 = BT_HCI_OP_LE_CS_ACI_2
, BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A4_B1 = BT_HCI_OP_LE_CS_ACI_3
,
BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B2 = BT_HCI_OP_LE_CS_ACI_4
, BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B3 = BT_HCI_OP_LE_CS_ACI_5
, BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B4 = BT_HCI_OP_LE_CS_ACI_6
, BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A2_B2 = BT_HCI_OP_LE_CS_ACI_7
} |
| | CS Test Tone Antenna Config Selection. More...
|
|
| struct bt_conn * | bt_conn_ref (struct bt_conn *conn) |
| | Increment a connection's reference count.
|
| void | bt_conn_unref (struct bt_conn *conn) |
| | Decrement a connection's reference count.
|
| static struct bt_conn * | bt_conn_take (struct bt_conn **orig) |
| | Take ownership of a connection pointer, setting the original to NULL.
|
| void | bt_conn_drop (struct bt_conn **orig) |
| | Drop a connection reference and clear the pointer.
|
| void | bt_conn_foreach (enum bt_conn_type type, void(*func)(struct bt_conn *conn, void *data), void *data) |
| | Iterate through all bt_conn objects.
|
| struct bt_conn * | bt_conn_lookup_addr_le (uint8_t id, const bt_addr_le_t *peer) |
| | Look up an existing connection by address.
|
| const bt_addr_le_t * | bt_conn_get_dst (const struct bt_conn *conn) |
| | Get destination (peer) address of a connection.
|
| uint8_t | bt_conn_index (const struct bt_conn *conn) |
| | Get array index of a connection.
|
| int | bt_conn_get_info (const struct bt_conn *conn, struct bt_conn_info *info) |
| | Get connection info.
|
| bool | bt_conn_is_type (const struct bt_conn *conn, enum bt_conn_type type) |
| | Function to determine the type of a connection.
|
| int | bt_conn_get_remote_info (const struct bt_conn *conn, struct bt_conn_remote_info *remote_info) |
| | Get connection info for the remote device.
|
| int | bt_conn_le_get_tx_power_level (struct bt_conn *conn, struct bt_conn_le_tx_power *tx_power_level) |
| | Get connection transmit power level.
|
| int | bt_conn_le_enhanced_get_tx_power_level (struct bt_conn *conn, struct bt_conn_le_tx_power *tx_power) |
| | Get local enhanced connection transmit power level.
|
| int | bt_conn_le_get_remote_tx_power_level (struct bt_conn *conn, enum bt_conn_le_tx_power_phy phy) |
| | Get remote (peer) transmit power level.
|
| int | bt_conn_le_set_tx_power_report_enable (struct bt_conn *conn, bool local_enable, bool remote_enable) |
| | Enable transmit power reporting.
|
| int | bt_conn_le_set_path_loss_mon_param (struct bt_conn *conn, const struct bt_conn_le_path_loss_reporting_param *param) |
| | Set Path Loss Monitoring Parameters.
|
| int | bt_conn_le_set_path_loss_mon_enable (struct bt_conn *conn, bool enable) |
| | Enable or Disable Path Loss Monitoring.
|
| int | bt_conn_le_subrate_set_defaults (const struct bt_conn_le_subrate_param *params) |
| | Set Default Connection Subrating Parameters.
|
| int | bt_conn_le_subrate_request (struct bt_conn *conn, const struct bt_conn_le_subrate_param *params) |
| | Request New Subrating Parameters.
|
| int | bt_conn_le_read_min_conn_interval_groups (struct bt_conn_le_min_conn_interval_info *info) |
| | Read Minimum Supported Connection Interval Groups.
|
| int | bt_conn_le_read_min_conn_interval (uint16_t *min_interval_us) |
| | Read Minimum Supported Connection Interval.
|
| int | bt_conn_le_conn_rate_set_defaults (const struct bt_conn_le_conn_rate_param *params) |
| | Set Default Connection Rate Parameters.
|
| int | bt_conn_le_conn_rate_request (struct bt_conn *conn, const struct bt_conn_le_conn_rate_param *params) |
| | Request New Connection Rate Parameters.
|
| int | bt_conn_le_read_all_remote_features (struct bt_conn *conn, uint8_t pages_requested) |
| | Read remote feature pages.
|
| int | bt_conn_le_frame_space_update (struct bt_conn *conn, const struct bt_conn_le_frame_space_update_param *params) |
| | Update frame space.
|
| int | bt_conn_le_param_update (struct bt_conn *conn, const struct bt_le_conn_param *param) |
| | Update the connection parameters.
|
| int | bt_conn_le_data_len_update (struct bt_conn *conn, const struct bt_conn_le_data_len_param *param) |
| | Update the connection transmit data length parameters.
|
| int | bt_conn_le_phy_update (struct bt_conn *conn, const struct bt_conn_le_phy_param *param) |
| | Update the connection PHY parameters.
|
| int | bt_conn_le_set_default_phy (uint8_t pref_tx_phy, uint8_t pref_rx_phy) |
| | Update the default PHY parameters to be used for all subsequent connections over the LE transport.
|
| int | bt_conn_disconnect (struct bt_conn *conn, uint8_t reason) |
| | Disconnect from a remote device or cancel pending connection.
|
| int | bt_conn_le_create (const bt_addr_le_t *peer, const struct bt_conn_le_create_param *create_param, const struct bt_le_conn_param *conn_param, struct bt_conn **conn) |
| | Initiate an LE connection to a remote device.
|
| int | bt_conn_le_create_synced (const struct bt_le_ext_adv *adv, const struct bt_conn_le_create_synced_param *synced_param, const struct bt_le_conn_param *conn_param, struct bt_conn **conn) |
| | Create a connection to a synced device.
|
| int | bt_conn_le_create_auto (const struct bt_conn_le_create_param *create_param, const struct bt_le_conn_param *conn_param) |
| | Automatically connect to remote devices in the filter accept list.
|
| int | bt_conn_create_auto_stop (void) |
| | Stop automatic connect creation.
|
| int | bt_conn_set_security (struct bt_conn *conn, bt_security_t sec) |
| | Set security level for a connection.
|
| bt_security_t | bt_conn_get_security (const struct bt_conn *conn) |
| | Get security level for a connection.
|
| uint8_t | bt_conn_enc_key_size (const struct bt_conn *conn) |
| | Get encryption key size.
|
| int | bt_conn_cb_register (struct bt_conn_cb *cb) |
| | Register connection callbacks.
|
| int | bt_conn_cb_unregister (struct bt_conn_cb *cb) |
| | Unregister connection callbacks.
|
| static const char * | bt_security_err_to_str (enum bt_security_err err) |
| | Converts a security error to string.
|
| void | bt_set_bondable (bool enable) |
| | Enable/disable bonding.
|
| bool | bt_get_bondable (void) |
| | Get bonding flag.
|
| int | bt_conn_set_bondable (struct bt_conn *conn, bool enable) |
| | Set/clear the bonding flag for a given connection.
|
| void | bt_le_oob_set_sc_flag (bool enable) |
| | Allow/disallow remote LE SC OOB data to be used for pairing.
|
| void | bt_le_oob_set_legacy_flag (bool enable) |
| | Allow/disallow remote legacy OOB data to be used for pairing.
|
| int | bt_le_oob_set_legacy_tk (struct bt_conn *conn, const uint8_t *tk) |
| | Set OOB Temporary Key to be used for pairing.
|
| int | bt_le_oob_set_sc_data (struct bt_conn *conn, const struct bt_le_oob_sc_data *oobd_local, const struct bt_le_oob_sc_data *oobd_remote) |
| | Set OOB data during LE Secure Connections (SC) pairing procedure.
|
| int | bt_le_oob_get_sc_data (struct bt_conn *conn, const struct bt_le_oob_sc_data **oobd_local, const struct bt_le_oob_sc_data **oobd_remote) |
| | Get OOB data used for LE Secure Connections (SC) pairing procedure.
|
Bluetooth connection handling.