Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
conn.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2015-2016 Intel Corporation
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_CONN_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_CONN_H_
12
20#include <stdbool.h>
21#include <stdint.h>
22
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35struct bt_conn;
36
44
52#define BT_LE_CONN_PARAM_INIT(int_min, int_max, lat, to) \
53{ \
54 .interval_min = (int_min), \
55 .interval_max = (int_max), \
56 .latency = (lat), \
57 .timeout = (to), \
58}
59
67#define BT_LE_CONN_PARAM(int_min, int_max, lat, to) \
68 ((struct bt_le_conn_param[]) { \
69 BT_LE_CONN_PARAM_INIT(int_min, int_max, lat, to) \
70 })
71
77#define BT_LE_CONN_PARAM_DEFAULT BT_LE_CONN_PARAM(BT_GAP_INIT_CONN_INT_MIN, \
78 BT_GAP_INIT_CONN_INT_MAX, \
79 0, 400)
80
86
88enum {
91
94
97};
98
105
111#define BT_CONN_LE_PHY_PARAM_INIT(_pref_tx_phy, _pref_rx_phy) \
112{ \
113 .options = BT_CONN_LE_PHY_OPT_NONE, \
114 .pref_tx_phy = (_pref_tx_phy), \
115 .pref_rx_phy = (_pref_rx_phy), \
116}
117
123#define BT_CONN_LE_PHY_PARAM(_pref_tx_phy, _pref_rx_phy) \
124 ((struct bt_conn_le_phy_param []) { \
125 BT_CONN_LE_PHY_PARAM_INIT(_pref_tx_phy, _pref_rx_phy) \
126 })
127
129#define BT_CONN_LE_PHY_PARAM_1M BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_1M, \
130 BT_GAP_LE_PHY_1M)
131
133#define BT_CONN_LE_PHY_PARAM_2M BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_2M, \
134 BT_GAP_LE_PHY_2M)
135
137#define BT_CONN_LE_PHY_PARAM_CODED BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_CODED, \
138 BT_GAP_LE_PHY_CODED)
139
141#define BT_CONN_LE_PHY_PARAM_ALL BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_1M | \
142 BT_GAP_LE_PHY_2M | \
143 BT_GAP_LE_PHY_CODED, \
144 BT_GAP_LE_PHY_1M | \
145 BT_GAP_LE_PHY_2M | \
146 BT_GAP_LE_PHY_CODED)
147
159
167
173#define BT_CONN_LE_DATA_LEN_PARAM_INIT(_tx_max_len, _tx_max_time) \
174{ \
175 .tx_max_len = (_tx_max_len), \
176 .tx_max_time = (_tx_max_time), \
177}
178
184#define BT_CONN_LE_DATA_LEN_PARAM(_tx_max_len, _tx_max_time) \
185 ((struct bt_conn_le_data_len_param[]) { \
186 BT_CONN_LE_DATA_LEN_PARAM_INIT(_tx_max_len, _tx_max_time) \
187 })
188
190#define BT_LE_DATA_LEN_PARAM_DEFAULT \
191 BT_CONN_LE_DATA_LEN_PARAM(BT_GAP_DATA_LEN_DEFAULT, \
192 BT_GAP_DATA_TIME_DEFAULT)
193
195#define BT_LE_DATA_LEN_PARAM_MAX \
196 BT_CONN_LE_DATA_LEN_PARAM(BT_GAP_DATA_LEN_MAX, \
197 BT_GAP_DATA_TIME_MAX)
198
218
229
249
264
274
284
294
410
415
425
437
445
463
473
481
489
540
547
553
565
577
662
674struct bt_conn *bt_conn_ref(struct bt_conn *conn);
675
682void bt_conn_unref(struct bt_conn *conn);
683
701 void (*func)(struct bt_conn *conn, void *data),
702 void *data);
703
716struct bt_conn *bt_conn_lookup_addr_le(uint8_t id, const bt_addr_le_t *peer);
717
724const bt_addr_le_t *bt_conn_get_dst(const struct bt_conn *conn);
725
736uint8_t bt_conn_index(const struct bt_conn *conn);
737
754#if defined(CONFIG_BT_USER_PHY_UPDATE)
756#endif /* defined(CONFIG_BT_USER_PHY_UPDATE) */
757
758#if defined(CONFIG_BT_USER_DATA_LEN_UPDATE)
759 /* Connection maximum single fragment parameters */
761#endif /* defined(CONFIG_BT_USER_DATA_LEN_UPDATE) */
762
763#if defined(CONFIG_BT_SUBRATING)
764 /* Connection subrating parameters */
765 const struct bt_conn_le_subrating_info *subrate;
766#endif /* defined(CONFIG_BT_SUBRATING) */
767};
768
776#define BT_CONN_INTERVAL_TO_MS(interval) ((interval) * 5U / 4U)
777
782#define BT_CONN_INTERVAL_TO_US(interval) ((interval) * 1250U)
783
786 const bt_addr_t *dst;
787};
788
789enum {
792};
793
804
822
830
840
861
864
867};
868
878
905
918
931
932
967
986
990
1000
1018
1031
1039int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info);
1040
1056int bt_conn_get_remote_info(struct bt_conn *conn,
1057 struct bt_conn_remote_info *remote_info);
1058
1067int bt_conn_le_get_tx_power_level(struct bt_conn *conn,
1068 struct bt_conn_le_tx_power *tx_power_level);
1069
1079 struct bt_conn_le_tx_power *tx_power);
1080
1090 enum bt_conn_le_tx_power_phy phy);
1091
1102 bool local_enable,
1103 bool remote_enable);
1104
1116int bt_conn_le_set_path_loss_mon_param(struct bt_conn *conn,
1117 const struct bt_conn_le_path_loss_reporting_param *param);
1118
1131int bt_conn_le_set_path_loss_mon_enable(struct bt_conn *conn, bool enable);
1132
1148
1160int bt_conn_le_subrate_request(struct bt_conn *conn,
1161 const struct bt_conn_le_subrate_param *params);
1162
1174int bt_conn_le_param_update(struct bt_conn *conn,
1175 const struct bt_le_conn_param *param);
1176
1184int bt_conn_le_data_len_update(struct bt_conn *conn,
1185 const struct bt_conn_le_data_len_param *param);
1186
1197int bt_conn_le_phy_update(struct bt_conn *conn,
1198 const struct bt_conn_le_phy_param *param);
1199
1222int bt_conn_disconnect(struct bt_conn *conn, uint8_t reason);
1223
1224enum {
1227
1233
1241};
1242
1289
1296#define BT_CONN_LE_CREATE_PARAM_INIT(_options, _interval, _window) \
1297{ \
1298 .options = (_options), \
1299 .interval = (_interval), \
1300 .window = (_window), \
1301 .interval_coded = 0, \
1302 .window_coded = 0, \
1303 .timeout = 0, \
1304}
1305
1312#define BT_CONN_LE_CREATE_PARAM(_options, _interval, _window) \
1313 ((struct bt_conn_le_create_param[]) { \
1314 BT_CONN_LE_CREATE_PARAM_INIT(_options, _interval, _window) \
1315 })
1316
1320#define BT_CONN_LE_CREATE_CONN \
1321 BT_CONN_LE_CREATE_PARAM(BT_CONN_LE_OPT_NONE, \
1322 BT_GAP_SCAN_FAST_INTERVAL, \
1323 BT_GAP_SCAN_FAST_INTERVAL)
1324
1329#define BT_CONN_LE_CREATE_CONN_AUTO \
1330 BT_CONN_LE_CREATE_PARAM(BT_CONN_LE_OPT_NONE, \
1331 BT_GAP_SCAN_FAST_INTERVAL, \
1332 BT_GAP_SCAN_FAST_WINDOW)
1333
1357 const struct bt_conn_le_create_param *create_param,
1358 const struct bt_le_conn_param *conn_param,
1359 struct bt_conn **conn);
1360
1373
1393int bt_conn_le_create_synced(const struct bt_le_ext_adv *adv,
1394 const struct bt_conn_le_create_synced_param *synced_param,
1395 const struct bt_le_conn_param *conn_param, struct bt_conn **conn);
1396
1413 const struct bt_le_conn_param *conn_param);
1414
1420
1436 const struct bt_le_conn_param *param);
1437
1474int bt_conn_set_security(struct bt_conn *conn, bt_security_t sec);
1475
1480bt_security_t bt_conn_get_security(const struct bt_conn *conn);
1481
1491uint8_t bt_conn_enc_key_size(const struct bt_conn *conn);
1492
1524
1529
1567
1569 /* The ID associated with the desired configuration (0 to 3) */
1571
1572 /* State of the CS procedure */
1574
1575 /* Antenna configuration index */
1577
1578 /* Transmit power level used for CS procedures (-127 to 20 dB; 0x7F if unavailable) */
1580
1581 /* Duration of each CS subevent in microseconds (1250 us to 4 s) */
1583
1584 /* Number of CS subevents anchored off the same ACL connection event (0x01 to 0x20) */
1586
1587 /* Time between consecutive CS subevents anchored off the same ACL connection event in
1588 * units of 0.625 ms
1589 */
1591
1592 /* Number of ACL connection events between consecutive CS event anchor points */
1594
1595 /* Number of ACL connection events between consecutive CS procedure anchor points */
1597
1598 /* Number of CS procedures to be scheduled (0 if procedures to continue until disabled) */
1600
1601 /* Maximum duration for each procedure in units of 0.625 ms (0x0001 to 0xFFFF) */
1603};
1604
1640 void (*connected)(struct bt_conn *conn, uint8_t err);
1641
1659 void (*disconnected)(struct bt_conn *conn, uint8_t reason);
1660
1673 void (*recycled)(void);
1674
1699 bool (*le_param_req)(struct bt_conn *conn,
1700 struct bt_le_conn_param *param);
1701
1712 void (*le_param_updated)(struct bt_conn *conn, uint16_t interval,
1713 uint16_t latency, uint16_t timeout);
1714#if defined(CONFIG_BT_SMP)
1724 void (*identity_resolved)(struct bt_conn *conn,
1725 const bt_addr_le_t *rpa,
1726 const bt_addr_le_t *identity);
1727#endif /* CONFIG_BT_SMP */
1728#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
1745 void (*security_changed)(struct bt_conn *conn, bt_security_t level,
1746 enum bt_security_err err);
1747#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC) */
1748
1749#if defined(CONFIG_BT_REMOTE_INFO)
1758 void (*remote_info_available)(struct bt_conn *conn,
1759 struct bt_conn_remote_info *remote_info);
1760#endif /* defined(CONFIG_BT_REMOTE_INFO) */
1761
1762#if defined(CONFIG_BT_USER_PHY_UPDATE)
1771 void (*le_phy_updated)(struct bt_conn *conn,
1772 struct bt_conn_le_phy_info *param);
1773#endif /* defined(CONFIG_BT_USER_PHY_UPDATE) */
1774
1775#if defined(CONFIG_BT_USER_DATA_LEN_UPDATE)
1784 void (*le_data_len_updated)(struct bt_conn *conn,
1785 struct bt_conn_le_data_len_info *info);
1786#endif /* defined(CONFIG_BT_USER_DATA_LEN_UPDATE) */
1787
1788#if defined(CONFIG_BT_DF_CONNECTION_CTE_RX)
1795 void (*cte_report_cb)(struct bt_conn *conn,
1796 const struct bt_df_conn_iq_samples_report *iq_report);
1797#endif /* CONFIG_BT_DF_CONNECTION_CTE_RX */
1798
1799#if defined(CONFIG_BT_TRANSMIT_POWER_CONTROL)
1811 void (*tx_power_report)(struct bt_conn *conn,
1812 const struct bt_conn_le_tx_power_report *report);
1813#endif /* CONFIG_BT_TRANSMIT_POWER_CONTROL */
1814
1815#if defined(CONFIG_BT_PATH_LOSS_MONITORING)
1825 void (*path_loss_threshold_report)(struct bt_conn *conn,
1826 const struct bt_conn_le_path_loss_threshold_report *report);
1827#endif /* CONFIG_BT_PATH_LOSS_MONITORING */
1828
1829#if defined(CONFIG_BT_SUBRATING)
1840 void (*subrate_changed)(struct bt_conn *conn,
1841 const struct bt_conn_le_subrate_changed *params);
1842#endif /* CONFIG_BT_SUBRATING */
1843
1844#if defined(CONFIG_BT_CHANNEL_SOUNDING)
1853 void (*le_cs_remote_capabilities_available)(struct bt_conn *conn,
1854 struct bt_conn_le_cs_capabilities *params);
1855
1864 void (*le_cs_remote_fae_table_available)(struct bt_conn *conn,
1865 struct bt_conn_le_cs_fae_table *params);
1866
1875 void (*le_cs_config_created)(struct bt_conn *conn, struct bt_conn_le_cs_config *config);
1876
1885 void (*le_cs_config_removed)(struct bt_conn *conn, uint8_t config_id);
1886
1895 void (*le_cs_subevent_data_available)(struct bt_conn *conn,
1896 struct bt_conn_le_cs_subevent_result *result);
1897
1905 void (*le_cs_security_enabled)(struct bt_conn *conn);
1906
1915 void (*le_cs_procedure_enabled)(
1916 struct bt_conn *conn, struct bt_conn_le_cs_procedure_enable_complete *params);
1917
1918#endif
1919
1921 sys_snode_t _node;
1922};
1923
1934
1947
1953#define BT_CONN_CB_DEFINE(_name) \
1954 static const STRUCT_SECTION_ITERABLE(bt_conn_cb, \
1955 _CONCAT(bt_conn_cb_, \
1956 _name))
1957
1964#if defined(CONFIG_BT_SECURITY_ERR_TO_STR)
1965const char *bt_security_err_to_str(enum bt_security_err err);
1966#else
1967static inline const char *bt_security_err_to_str(enum bt_security_err err)
1968{
1969 ARG_UNUSED(err);
1970
1971 return "";
1972}
1973#endif
1974
1985void bt_set_bondable(bool enable);
1986
1997
2016int bt_conn_set_bondable(struct bt_conn *conn, bool enable);
2017
2024void bt_le_oob_set_sc_flag(bool enable);
2025
2033
2045int bt_le_oob_set_legacy_tk(struct bt_conn *conn, const uint8_t *tk);
2046
2065int bt_le_oob_set_sc_data(struct bt_conn *conn,
2066 const struct bt_le_oob_sc_data *oobd_local,
2067 const struct bt_le_oob_sc_data *oobd_remote);
2068
2084int bt_le_oob_get_sc_data(struct bt_conn *conn,
2085 const struct bt_le_oob_sc_data **oobd_local,
2086 const struct bt_le_oob_sc_data **oobd_remote);
2087
2092#define BT_PASSKEY_INVALID 0xffffffff
2093
2107int bt_passkey_set(unsigned int passkey);
2108
2140
2141#if defined(CONFIG_BT_SMP_APP_PAIRING_ACCEPT)
2171#endif /* CONFIG_BT_SMP_APP_PAIRING_ACCEPT */
2172
2175#if defined(CONFIG_BT_SMP_APP_PAIRING_ACCEPT)
2203 enum bt_security_err (*pairing_accept)(struct bt_conn *conn,
2204 const struct bt_conn_pairing_feat *const feat);
2205#endif /* CONFIG_BT_SMP_APP_PAIRING_ACCEPT */
2206
2225 void (*passkey_display)(struct bt_conn *conn, unsigned int passkey);
2226
2227#if defined(CONFIG_BT_PASSKEY_KEYPRESS)
2249 void (*passkey_display_keypress)(struct bt_conn *conn,
2250 enum bt_conn_auth_keypress type);
2251#endif
2252
2271 void (*passkey_entry)(struct bt_conn *conn);
2272
2294 void (*passkey_confirm)(struct bt_conn *conn, unsigned int passkey);
2295
2312 void (*oob_data_request)(struct bt_conn *conn,
2313 struct bt_conn_oob_info *info);
2314
2327 void (*cancel)(struct bt_conn *conn);
2328
2347 void (*pairing_confirm)(struct bt_conn *conn);
2348
2349#if defined(CONFIG_BT_CLASSIC)
2368 void (*pincode_entry)(struct bt_conn *conn, bool highsec);
2369#endif
2370};
2371
2383 void (*pairing_complete)(struct bt_conn *conn, bool bonded);
2384
2390 void (*pairing_failed)(struct bt_conn *conn,
2391 enum bt_security_err reason);
2392
2401 void (*bond_deleted)(uint8_t id, const bt_addr_le_t *peer);
2402
2405};
2406
2417
2432int bt_conn_auth_cb_overlay(struct bt_conn *conn, const struct bt_conn_auth_cb *cb);
2433
2444
2454
2465int bt_conn_auth_passkey_entry(struct bt_conn *conn, unsigned int passkey);
2466
2482int bt_conn_auth_keypress_notify(struct bt_conn *conn, enum bt_conn_auth_keypress type);
2483
2492int bt_conn_auth_cancel(struct bt_conn *conn);
2493
2503int bt_conn_auth_passkey_confirm(struct bt_conn *conn);
2504
2514int bt_conn_auth_pairing_confirm(struct bt_conn *conn);
2515
2526int bt_conn_auth_pincode_entry(struct bt_conn *conn, const char *pin);
2527
2532
2537#define BT_BR_CONN_PARAM_INIT(role_switch) \
2538{ \
2539 .allow_role_switch = (role_switch), \
2540}
2541
2546#define BT_BR_CONN_PARAM(role_switch) \
2547 ((struct bt_br_conn_param[]) { \
2548 BT_BR_CONN_PARAM_INIT(role_switch) \
2549 })
2550
2554#define BT_BR_CONN_PARAM_DEFAULT BT_BR_CONN_PARAM(true)
2555
2556
2569struct bt_conn *bt_conn_create_br(const bt_addr_t *peer,
2570 const struct bt_br_conn_param *param);
2571
2572#ifdef __cplusplus
2573}
2574#endif
2575
2580#endif /* ZEPHYR_INCLUDE_BLUETOOTH_CONN_H_ */
Bluetooth device address definitions and utilities.
Bluetooth subsystem core APIs.
Bluetooth Generic Access Profile defines and Assigned Numbers.
void bt_set_bondable(bool enable)
Enable/disable bonding.
struct bt_conn * bt_conn_ref(struct bt_conn *conn)
Increment a connection's reference count.
bt_conn_le_cs_sub_mode
Channel sounding sub mode.
Definition conn.h:427
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_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.
bool bt_get_bondable(void)
Get bonding flag.
bt_conn_le_cs_role
Channel sounding role.
Definition conn.h:439
int bt_le_oob_set_legacy_tk(struct bt_conn *conn, const uint8_t *tk)
Set OOB Temporary Key to be used for pairing.
bt_conn_le_cs_main_mode
Channel sounding main mode.
Definition conn.h:417
int bt_conn_disconnect(struct bt_conn *conn, uint8_t reason)
Disconnect from a remote device or cancel pending connection.
bt_conn_le_cs_capability_rtt_sounding
Supported Sounding Sequence RTT precision.
Definition conn.h:276
int bt_conn_auth_cb_register(const struct bt_conn_auth_cb *cb)
Register authentication callbacks.
struct bt_conn * bt_conn_lookup_addr_le(uint8_t id, const bt_addr_le_t *peer)
Look up an existing connection by address.
int bt_conn_auth_keypress_notify(struct bt_conn *conn, enum bt_conn_auth_keypress type)
Send Passkey Keypress Notification during pairing.
int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info)
Get connection info.
bt_security_flag
Security Info Flags.
Definition conn.h:824
bt_conn_le_cs_procedure_abort_reason
Procedure abort reason.
Definition conn.h:555
static const char * bt_security_err_to_str(enum bt_security_err err)
Converts a security error to string.
Definition conn.h:1967
int bt_passkey_set(unsigned int passkey)
Set a fixed passkey to be used for pairing.
bt_conn_le_cs_chsel_type
Channel sounding channel selection type.
Definition conn.h:475
int bt_conn_auth_passkey_entry(struct bt_conn *conn, unsigned int passkey)
Reply with entered passkey.
int bt_conn_auth_pairing_confirm(struct bt_conn *conn)
Reply if incoming pairing was confirmed by user.
int bt_conn_auth_pincode_entry(struct bt_conn *conn, const char *pin)
Reply with entered PIN code.
int bt_conn_set_bondable(struct bt_conn *conn, bool enable)
Set/clear the bonding flag for a given connection.
void bt_conn_unref(struct bt_conn *conn)
Decrement a connection's reference count.
bt_security_t bt_conn_get_security(const struct bt_conn *conn)
Get security level for a connection.
bt_conn_le_cs_capability_rtt_random_payload
Supported Random Payload RTT precision.
Definition conn.h:286
bt_conn_auth_keypress
Passkey Keypress Notification type.
Definition conn.h:1024
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.
int bt_conn_create_auto_stop(void)
Stop automatic connect creation.
bt_conn_le_cs_subevent_abort_reason
Subevent abort reason.
Definition conn.h:567
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_get_remote_info(struct bt_conn *conn, struct bt_conn_remote_info *remote_info)
Get connection info for the remote device.
bt_conn_le_tx_power_phy
Definition conn.h:906
int bt_conn_le_subrate_request(struct bt_conn *conn, const struct bt_conn_le_subrate_param *params)
Request New Subrating Parameters.
const bt_addr_le_t * bt_conn_get_dst(const struct bt_conn *conn)
Get destination (peer) address of a connection.
int bt_conn_auth_cb_overlay(struct bt_conn *conn, const struct bt_conn_auth_cb *cb)
Overlay authentication callbacks used for a given connection.
int bt_conn_auth_cancel(struct bt_conn *conn)
Cancel ongoing authenticated pairing.
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_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.
bt_conn_le_cs_subevent_done_status
Subevent done status.
Definition conn.h:549
int bt_le_set_auto_conn(const bt_addr_le_t *addr, const struct bt_le_conn_param *param)
Automatically connect to remote device if it's in range.
int bt_conn_le_set_path_loss_mon_enable(struct bt_conn *conn, bool enable)
Enable or Disable Path Loss Monitoring.
bt_conn_state
Definition conn.h:794
void bt_le_oob_set_legacy_flag(bool enable)
Allow/disallow remote legacy OOB data to be used for pairing.
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.
bt_conn_le_cs_procedure_done_status
Procedure done status.
Definition conn.h:542
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_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.
bt_security_err
Definition conn.h:1493
int bt_conn_cb_register(struct bt_conn_cb *cb)
Register connection callbacks.
bt_conn_le_cs_sync_phy
Channel sounding PHY used for CS sync.
Definition conn.h:465
int bt_conn_le_param_update(struct bt_conn *conn, const struct bt_le_conn_param *param)
Update the connection parameters.
bt_conn_le_cs_tone_antenna_config_selection
CS Test Tone Antennna Config Selection.
Definition conn.h:1557
int bt_conn_auth_passkey_confirm(struct bt_conn *conn)
Reply if passkey was confirmed to match by user.
bt_conn_type
Connection Type.
Definition conn.h:251
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_conn_auth_info_cb_register(struct bt_conn_auth_info_cb *cb)
Register authentication information callbacks.
int bt_conn_auth_info_cb_unregister(struct bt_conn_auth_info_cb *cb)
Unregister authentication information callbacks.
int bt_conn_le_subrate_set_defaults(const struct bt_conn_le_subrate_param *params)
Set Default Connection Subrating Parameters.
void bt_le_oob_set_sc_flag(bool enable)
Allow/disallow remote LE SC OOB data to be used for pairing.
int bt_conn_cb_unregister(struct bt_conn_cb *cb)
Unregister connection callbacks.
uint8_t bt_conn_index(const struct bt_conn *conn)
Get array index of a connection.
int bt_conn_set_security(struct bt_conn *conn, bt_security_t sec)
Set security level for a connection.
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_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.
bt_security_t
Security level.
Definition conn.h:806
bt_conn_le_cs_ch3c_shape
Channel sounding channel sequence shape.
Definition conn.h:483
bt_conn_le_cs_procedure_enable_state
Definition conn.h:1525
bt_conn_le_path_loss_zone
Path Loss zone that has been entered.
Definition conn.h:976
struct bt_conn * bt_conn_create_br(const bt_addr_t *peer, const struct bt_br_conn_param *param)
Initiate an BR/EDR connection to a remote device.
bt_conn_le_cs_capability_rtt_aa_only
Supported AA-Only RTT precision.
Definition conn.h:266
uint8_t bt_conn_enc_key_size(const struct bt_conn *conn)
Get encryption key size.
bt_conn_le_cs_rtt_type
Channel sounding RTT type.
Definition conn.h:447
@ BT_CONN_LE_CS_SUB_MODE_3
Mode-3 (RTT and PBR)
Definition conn.h:435
@ BT_CONN_LE_CS_SUB_MODE_UNUSED
Unused.
Definition conn.h:429
@ BT_CONN_LE_CS_SUB_MODE_1
Mode-1 (RTT)
Definition conn.h:431
@ BT_CONN_LE_CS_SUB_MODE_2
Mode-2 (PBR)
Definition conn.h:433
@ BT_CONN_LE_CS_ROLE_REFLECTOR
CS reflector role.
Definition conn.h:443
@ BT_CONN_LE_CS_ROLE_INITIATOR
CS initiator role.
Definition conn.h:441
@ BT_CONN_LE_CS_MAIN_MODE_1
Mode-1 (RTT)
Definition conn.h:419
@ BT_CONN_LE_CS_MAIN_MODE_2
Mode-2 (PBR)
Definition conn.h:421
@ BT_CONN_LE_CS_MAIN_MODE_3
Mode-3 (RTT and PBR)
Definition conn.h:423
@ BT_CONN_LE_CS_RTT_SOUNDING_150NS
150ns time-of-flight accuracy.
Definition conn.h:282
@ BT_CONN_LE_CS_RTT_SOUNDING_NOT_SUPP
Sounding Sequence RTT variant is not supported.
Definition conn.h:278
@ BT_CONN_LE_CS_RTT_SOUNDING_10NS
10ns time-of-flight accuracy.
Definition conn.h:280
@ BT_SECURITY_FLAG_OOB
Paired with Out of Band method.
Definition conn.h:828
@ BT_SECURITY_FLAG_SC
Paired with Secure Connections.
Definition conn.h:826
@ BT_CONN_LE_CS_PROCEDURE_ABORT_REQUESTED
Definition conn.h:557
@ BT_CONN_LE_CS_PROCEDURE_ABORT_TOO_FEW_CHANNELS
Definition conn.h:559
@ BT_CONN_LE_CS_PROCEDURE_NOT_ABORTED
Definition conn.h:556
@ BT_CONN_LE_CS_PROCEDURE_ABORT_UNSPECIFIED
Definition conn.h:563
@ BT_CONN_LE_CS_PROCEDURE_ABORT_CHMAP_INSTANT_PASSED
Definition conn.h:561
@ BT_CONN_LE_CS_CHSEL_TYPE_3C
Use Channel Selection Algorithm #3c for non-mode-0 CS steps.
Definition conn.h:479
@ BT_CONN_LE_CS_CHSEL_TYPE_3B
Use Channel Selection Algorithm #3b for non-mode-0 CS steps.
Definition conn.h:477
@ BT_CONN_LE_CS_RTT_RANDOM_PAYLOAD_10NS
10ns time-of-flight accuracy.
Definition conn.h:290
@ BT_CONN_LE_CS_RTT_RANDOM_PAYLOAD_NOT_SUPP
Random Payload RTT variant is not supported.
Definition conn.h:288
@ BT_CONN_LE_CS_RTT_RANDOM_PAYLOAD_150NS
150ns time-of-flight accuracy.
Definition conn.h:292
@ BT_CONN_AUTH_KEYPRESS_DIGIT_ERASED
Definition conn.h:1027
@ BT_CONN_AUTH_KEYPRESS_DIGIT_ENTERED
Definition conn.h:1026
@ BT_CONN_AUTH_KEYPRESS_CLEARED
Definition conn.h:1028
@ BT_CONN_AUTH_KEYPRESS_ENTRY_STARTED
Definition conn.h:1025
@ BT_CONN_AUTH_KEYPRESS_ENTRY_COMPLETED
Definition conn.h:1029
@ BT_CONN_LE_PHY_OPT_CODED_S2
LE Coded using S=2 coding preferred when transmitting.
Definition conn.h:93
@ BT_CONN_LE_PHY_OPT_CODED_S8
LE Coded using S=8 coding preferred when transmitting.
Definition conn.h:96
@ BT_CONN_LE_PHY_OPT_NONE
Convenience value when no options are specified.
Definition conn.h:90
@ BT_CONN_LE_CS_SUBEVENT_NOT_ABORTED
Definition conn.h:568
@ BT_CONN_LE_CS_SUBEVENT_ABORT_UNSPECIFIED
Definition conn.h:575
@ BT_CONN_LE_CS_SUBEVENT_ABORT_REQUESTED
Definition conn.h:569
@ BT_CONN_LE_CS_SUBEVENT_ABORT_SCHED_CONFLICT
Definition conn.h:573
@ BT_CONN_LE_CS_SUBEVENT_ABORT_NO_CS_SYNC
Definition conn.h:571
@ BT_CONN_LE_TX_POWER_PHY_NONE
Convenience macro for when no PHY is set.
Definition conn.h:908
@ BT_CONN_LE_TX_POWER_PHY_CODED_S2
LE Coded PHY using S=2 coding.
Definition conn.h:916
@ BT_CONN_LE_TX_POWER_PHY_CODED_S8
LE Coded PHY using S=8 coding.
Definition conn.h:914
@ BT_CONN_LE_TX_POWER_PHY_1M
LE 1M PHY.
Definition conn.h:910
@ BT_CONN_LE_TX_POWER_PHY_2M
LE 2M PHY.
Definition conn.h:912
@ BT_CONN_LE_CS_SUBEVENT_ABORTED
Definition conn.h:551
@ BT_CONN_LE_CS_SUBEVENT_COMPLETE
Definition conn.h:550
@ BT_CONN_STATE_CONNECTING
Channel in connecting state.
Definition conn.h:798
@ BT_CONN_STATE_CONNECTED
Channel connected and ready for upper layer traffic on it.
Definition conn.h:800
@ BT_CONN_STATE_DISCONNECTED
Channel disconnected.
Definition conn.h:796
@ BT_CONN_STATE_DISCONNECTING
Channel in disconnecting state.
Definition conn.h:802
@ BT_CONN_LE_CS_PROCEDURE_ABORTED
Definition conn.h:545
@ BT_CONN_LE_CS_PROCEDURE_COMPLETE
Definition conn.h:543
@ BT_CONN_LE_CS_PROCEDURE_INCOMPLETE
Definition conn.h:544
@ BT_SECURITY_ERR_OOB_NOT_AVAILABLE
OOB data is not available.
Definition conn.h:1504
@ BT_SECURITY_ERR_AUTH_REQUIREMENT
The requested security level could not be reached.
Definition conn.h:1507
@ BT_SECURITY_ERR_KEY_REJECTED
Distributed Key Rejected.
Definition conn.h:1519
@ BT_SECURITY_ERR_UNSPECIFIED
Pairing failed but the exact reason could not be specified.
Definition conn.h:1522
@ BT_SECURITY_ERR_INVALID_PARAM
Invalid parameters.
Definition conn.h:1516
@ BT_SECURITY_ERR_PAIR_NOT_SUPPORTED
Pairing is not supported.
Definition conn.h:1510
@ BT_SECURITY_ERR_AUTH_FAIL
Authentication failed.
Definition conn.h:1498
@ BT_SECURITY_ERR_PIN_OR_KEY_MISSING
PIN or encryption key is missing.
Definition conn.h:1501
@ BT_SECURITY_ERR_SUCCESS
Security procedure successful.
Definition conn.h:1495
@ BT_SECURITY_ERR_PAIR_NOT_ALLOWED
Pairing is not allowed.
Definition conn.h:1513
@ BT_CONN_LE_CS_SYNC_1M_PHY
LE 1M PHY.
Definition conn.h:467
@ BT_CONN_LE_CS_SYNC_2M_PHY
LE 2M PHY.
Definition conn.h:469
@ BT_CONN_LE_CS_SYNC_2M_2BT_PHY
LE 2M 2BT PHY.
Definition conn.h:471
@ BT_CONN_ROLE_PERIPHERAL
Definition conn.h:791
@ BT_CONN_ROLE_CENTRAL
Definition conn.h:790
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_TWO
Definition conn.h:1559
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_FIVE
Definition conn.h:1562
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_SEVEN
Definition conn.h:1564
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_FOUR
Definition conn.h:1561
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_EIGHT
Definition conn.h:1565
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_SIX
Definition conn.h:1563
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_ONE
Definition conn.h:1558
@ BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_THREE
Definition conn.h:1560
@ BT_CONN_TYPE_LE
LE Connection Type.
Definition conn.h:253
@ BT_CONN_TYPE_ALL
All Connection Type.
Definition conn.h:261
@ BT_CONN_TYPE_BR
BR/EDR Connection Type.
Definition conn.h:255
@ BT_CONN_TYPE_ISO
ISO Connection Type.
Definition conn.h:259
@ BT_CONN_TYPE_SCO
SCO Connection Type.
Definition conn.h:257
@ BT_CONN_LE_OPT_NONE
Convenience value when no options are specified.
Definition conn.h:1226
@ BT_CONN_LE_OPT_NO_1M
Disable LE 1M PHY.
Definition conn.h:1240
@ BT_CONN_LE_OPT_CODED
Enable LE Coded PHY.
Definition conn.h:1232
@ BT_SECURITY_L4
Level 4: Authenticated Secure Connections and 128-bit key.
Definition conn.h:816
@ BT_SECURITY_L0
Level 0: Only for BR/EDR special cases, like SDP.
Definition conn.h:808
@ BT_SECURITY_L3
Level 3: Encryption and authentication (MITM).
Definition conn.h:814
@ BT_SECURITY_FORCE_PAIR
Bit to force new pairing procedure, bit-wise OR with requested security level.
Definition conn.h:820
@ BT_SECURITY_L1
Level 1: No encryption and no authentication.
Definition conn.h:810
@ BT_SECURITY_L2
Level 2: Encryption and no authentication (no MITM).
Definition conn.h:812
@ BT_CONN_LE_CS_CH3C_SHAPE_HAT
Use Hat shape for user-specified channel sequence.
Definition conn.h:485
@ BT_CONN_LE_CS_CH3C_SHAPE_X
Use X shape for user-specified channel sequence.
Definition conn.h:487
@ BT_CONN_LE_CS_PROCEDURES_ENABLED
Definition conn.h:1527
@ BT_CONN_LE_CS_PROCEDURES_DISABLED
Definition conn.h:1526
@ BT_CONN_LE_PATH_LOSS_ZONE_ENTERED_MIDDLE
Middle path loss zone entered.
Definition conn.h:980
@ BT_CONN_LE_PATH_LOSS_ZONE_ENTERED_LOW
Low path loss zone entered.
Definition conn.h:978
@ BT_CONN_LE_PATH_LOSS_ZONE_ENTERED_HIGH
High path loss zone entered.
Definition conn.h:982
@ BT_CONN_LE_PATH_LOSS_ZONE_UNAVAILABLE
Path loss has become unavailable.
Definition conn.h:984
@ BT_CONN_LE_CS_RTT_AA_ONLY_NOT_SUPP
AA-Only RTT variant is not supported.
Definition conn.h:268
@ BT_CONN_LE_CS_RTT_AA_ONLY_150NS
150ns time-of-flight accuracy.
Definition conn.h:272
@ BT_CONN_LE_CS_RTT_AA_ONLY_10NS
10ns time-of-flight accuracy.
Definition conn.h:270
@ BT_CONN_LE_CS_RTT_TYPE_96_BIT_SOUNDING
RTT with 96-bit sounding sequence.
Definition conn.h:453
@ BT_CONN_LE_CS_RTT_TYPE_32_BIT_SOUNDING
RTT with 32-bit sounding sequence.
Definition conn.h:451
@ BT_CONN_LE_CS_RTT_TYPE_128_BIT_RANDOM
RTT with 128-bit random sequence.
Definition conn.h:461
@ BT_CONN_LE_CS_RTT_TYPE_AA_ONLY
RTT AA only.
Definition conn.h:449
@ BT_CONN_LE_CS_RTT_TYPE_96_BIT_RANDOM
RTT with 96-bit random sequence.
Definition conn.h:459
@ BT_CONN_LE_CS_RTT_TYPE_32_BIT_RANDOM
RTT with 32-bit random sequence.
Definition conn.h:455
@ BT_CONN_LE_CS_RTT_TYPE_64_BIT_RANDOM
RTT with 64-bit random sequence.
Definition conn.h:457
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
#define BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_NO_ABORT
Definition hci_types.h:3599
#define BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_NO_ABORT
Definition hci_types.h:3605
#define BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_UNSPECIFIED
Definition hci_types.h:3603
#define BT_HCI_OP_LE_CS_RTT_TYPE_128BIT_RAND
Definition hci_types.h:2563
#define BT_HCI_OP_LE_CS_SUB_MODE_1
Definition hci_types.h:2549
#define BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_LOCAL_HOST_OR_REMOTE_REQUEST
Definition hci_types.h:3600
#define BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_SCHED_CONFLICT
Definition hci_types.h:3608
#define BT_HCI_OP_LE_CS_PROCEDURES_DISABLED
Definition hci_types.h:2534
#define BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_LOCAL_HOST_OR_REMOTE_REQUEST
Definition hci_types.h:3606
#define BT_HCI_OP_LE_CS_PROCEDURES_ENABLED
Definition hci_types.h:2535
#define BT_HCI_OP_LE_CS_SUB_MODE_3
Definition hci_types.h:2551
#define BT_HCI_OP_LE_CS_ACI_6
Definition hci_types.h:2578
#define BT_HCI_OP_LE_CS_ACI_1
Definition hci_types.h:2573
#define BT_HCI_OP_LE_CS_MAIN_MODE_3
Definition hci_types.h:2547
#define BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_TOO_FEW_CHANNELS
Definition hci_types.h:3601
#define BT_HCI_OP_LE_CS_MAIN_MODE_2
Definition hci_types.h:2546
#define BT_HCI_OP_LE_CS_RTT_TYPE_96BIT_SOUND
Definition hci_types.h:2559
#define BT_HCI_OP_LE_CS_RTT_TYPE_AA_ONLY
Definition hci_types.h:2557
#define BT_HCI_OP_LE_CS_ACI_3
Definition hci_types.h:2575
#define BT_HCI_OP_LE_CS_TEST_CHSEL_TYPE_3B
Definition hci_types.h:2605
#define BT_HCI_OP_LE_CS_RTT_TYPE_64BIT_RAND
Definition hci_types.h:2561
#define BT_HCI_OP_LE_CS_CS_SYNC_1M
Definition hci_types.h:2565
#define BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_ABORTED
Definition hci_types.h:3593
#define BT_HCI_OP_LE_CS_ACI_0
Definition hci_types.h:2572
#define BT_HCI_OP_LE_CS_RTT_TYPE_32BIT_SOUND
Definition hci_types.h:2558
#define BT_HCI_OP_LE_CS_RTT_TYPE_96BIT_RAND
Definition hci_types.h:2562
#define BT_HCI_OP_LE_CS_ACI_2
Definition hci_types.h:2574
#define BT_HCI_OP_LE_CS_SUB_MODE_UNUSED
Definition hci_types.h:2552
#define BT_HCI_LE_ZONE_ENTERED_MIDDLE
Definition hci_types.h:3403
#define BT_HCI_OP_LE_CS_RTT_TYPE_32BIT_RAND
Definition hci_types.h:2560
#define BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_UNSPECIFIED
Definition hci_types.h:3609
#define BT_HCI_OP_LE_CS_CS_SYNC_2M_2BT
Definition hci_types.h:2567
#define BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_NO_CS_SYNC_RECEIVED
Definition hci_types.h:3607
#define BT_HCI_OP_LE_CS_ACI_7
Definition hci_types.h:2579
#define BT_HCI_OP_LE_CS_TEST_CH3C_SHAPE_HAT
Definition hci_types.h:2608
#define BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_COMPLETE
Definition hci_types.h:3591
#define BT_HCI_OP_LE_CS_TEST_CH3C_SHAPE_X
Definition hci_types.h:2609
#define BT_HCI_OP_LE_CS_ACI_5
Definition hci_types.h:2577
#define BT_HCI_OP_LE_CS_SUB_MODE_2
Definition hci_types.h:2550
#define BT_HCI_OP_LE_CS_CS_SYNC_2M
Definition hci_types.h:2566
#define BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_CHMAP_INSTANT_PASSED
Definition hci_types.h:3602
#define BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_COMPLETE
Definition hci_types.h:3595
#define BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_PARTIAL
Definition hci_types.h:3592
#define BT_HCI_OP_LE_CS_ACI_4
Definition hci_types.h:2576
#define BT_HCI_OP_LE_CS_TEST_CHSEL_TYPE_3C
Definition hci_types.h:2606
#define BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_ABORTED
Definition hci_types.h:3597
#define BT_HCI_OP_LE_CS_MAIN_MODE_1
Definition hci_types.h:2545
#define BT_HCI_LE_ZONE_ENTERED_HIGH
Definition hci_types.h:3404
#define BT_HCI_LE_ZONE_ENTERED_LOW
Definition hci_types.h:3402
#define bool
Definition stdbool.h:13
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
Bluetooth LE Device Address.
Definition addr.h:49
Bluetooth Device Address.
Definition addr.h:40
Connection parameters for BR/EDR connections.
Definition conn.h:2529
bool allow_role_switch
Definition conn.h:2530
Authenticated pairing callback structure.
Definition conn.h:2174
void(* passkey_entry)(struct bt_conn *conn)
Request the user to enter a passkey.
Definition conn.h:2271
void(* passkey_display)(struct bt_conn *conn, unsigned int passkey)
Display a passkey to the user.
Definition conn.h:2225
void(* passkey_confirm)(struct bt_conn *conn, unsigned int passkey)
Request the user to confirm a passkey.
Definition conn.h:2294
enum bt_security_err(* pairing_accept)(struct bt_conn *conn, const struct bt_conn_pairing_feat *const feat)
Query to proceed incoming pairing or not.
Definition conn.h:2203
void(* pincode_entry)(struct bt_conn *conn, bool highsec)
Request the user to enter a passkey.
Definition conn.h:2368
void(* oob_data_request)(struct bt_conn *conn, struct bt_conn_oob_info *info)
Request the user to provide Out of Band (OOB) data.
Definition conn.h:2312
void(* pairing_confirm)(struct bt_conn *conn)
Request confirmation for an incoming pairing.
Definition conn.h:2347
void(* cancel)(struct bt_conn *conn)
Cancel the ongoing user request.
Definition conn.h:2327
Authenticated pairing information callback structure.
Definition conn.h:2373
void(* pairing_failed)(struct bt_conn *conn, enum bt_security_err reason)
notify that pairing process has failed.
Definition conn.h:2390
void(* pairing_complete)(struct bt_conn *conn, bool bonded)
notify that pairing procedure was complete.
Definition conn.h:2383
void(* bond_deleted)(uint8_t id, const bt_addr_le_t *peer)
Notify that bond has been deleted.
Definition conn.h:2401
sys_snode_t node
Internally used field for list handling.
Definition conn.h:2404
BR/EDR Connection Info Structure.
Definition conn.h:785
const bt_addr_t * dst
Destination (Remote) BR/EDR address.
Definition conn.h:786
BR/EDR Connection Remote Info structure.
Definition conn.h:870
uint8_t num_pages
Number of pages in the remote feature set.
Definition conn.h:876
const uint8_t * features
Remote feature set (pages of bitmasks).
Definition conn.h:873
Connection callback structure.
Definition conn.h:1615
void(* le_param_updated)(struct bt_conn *conn, uint16_t interval, uint16_t latency, uint16_t timeout)
The parameters for an LE connection have been updated.
Definition conn.h:1712
void(* le_data_len_updated)(struct bt_conn *conn, struct bt_conn_le_data_len_info *info)
The data length parameters of the connection has changed.
Definition conn.h:1784
void(* recycled)(void)
A connection object has been returned to the pool.
Definition conn.h:1673
bool(* le_param_req)(struct bt_conn *conn, struct bt_le_conn_param *param)
LE connection parameter update request.
Definition conn.h:1699
void(* disconnected)(struct bt_conn *conn, uint8_t reason)
A connection has been disconnected.
Definition conn.h:1659
void(* connected)(struct bt_conn *conn, uint8_t err)
A new connection has been established.
Definition conn.h:1640
void(* le_phy_updated)(struct bt_conn *conn, struct bt_conn_le_phy_info *param)
The PHY of the connection has changed.
Definition conn.h:1771
void(* security_changed)(struct bt_conn *conn, bt_security_t level, enum bt_security_err err)
The security level of a connection has changed.
Definition conn.h:1745
void(* identity_resolved)(struct bt_conn *conn, const bt_addr_le_t *rpa, const bt_addr_le_t *identity)
Remote Identity Address has been resolved.
Definition conn.h:1724
void(* remote_info_available)(struct bt_conn *conn, struct bt_conn_remote_info *remote_info)
Remote information procedures has completed.
Definition conn.h:1758
Connection Info Structure.
Definition conn.h:842
uint8_t id
Which local identity the connection was created with.
Definition conn.h:848
struct bt_conn_le_info le
LE Connection specific Info.
Definition conn.h:852
enum bt_conn_type type
Connection Type.
Definition conn.h:844
struct bt_conn_br_info br
BR/EDR Connection specific Info.
Definition conn.h:854
uint8_t role
Connection Role.
Definition conn.h:846
struct bt_security_info security
Security specific info.
Definition conn.h:859
enum bt_conn_state state
Connection state.
Definition conn.h:857
Definition conn.h:1243
uint16_t interval_coded
Scan interval LE Coded PHY (N * 0.625 MS)
Definition conn.h:1272
uint16_t window
Scan window (N * 0.625 ms)
Definition conn.h:1266
uint32_t options
Bit-field of create connection options.
Definition conn.h:1246
uint16_t timeout
Connection initiation timeout (N * 10 MS)
Definition conn.h:1287
uint16_t interval
Scan interval (N * 0.625 ms)
Definition conn.h:1256
uint16_t window_coded
Scan window LE Coded PHY (N * 0.625 MS)
Definition conn.h:1278
Definition conn.h:1361
const bt_addr_le_t * peer
Remote address.
Definition conn.h:1368
uint8_t subevent
The subevent where the connection will be initiated.
Definition conn.h:1371
Remote channel sounding capabilities for LE connections supporting CS.
Definition conn.h:296
uint16_t t_ip1_times_supported
Optional T_IP1 time durations during CS steps.
Definition conn.h:367
bool phase_based_nadm_random_supported
Phase-based normalized attack detector metric when a CS_SYNC with random sequence is received.
Definition conn.h:346
uint16_t t_fcs_times_supported
Optional T_FCS time durations during CS steps.
Definition conn.h:391
bool cs_without_fae_supported
Subfeature: CS with no Frequency Actuation Error.
Definition conn.h:352
uint8_t rtt_random_payload_n
Number of CS steps needed to achieve the accuracy requirements for RTT Random Payload.
Definition conn.h:338
bool cs_sync_2m_phy_supported
CS_SYNC LE 2M PHY.
Definition conn.h:348
enum bt_conn_le_cs_capability_rtt_aa_only rtt_aa_only_precision
RTT AA-Only.
Definition conn.h:316
uint8_t num_antennas_supported
Number of antennas.
Definition conn.h:306
uint8_t t_sw_time
Time in microseconds for the antenna switch period of the CS tones.
Definition conn.h:399
bool cs_sync_2m_2bt_phy_supported
CS_SYNC LE 2M 2BT PHY.
Definition conn.h:350
bool initiator_supported
Initiator role.
Definition conn.h:310
bool reflector_supported
Reflector role.
Definition conn.h:312
uint16_t t_pm_times_supported
Optional T_PM time durations during CS steps.
Definition conn.h:397
uint8_t num_config_supported
Number of CS configurations.
Definition conn.h:298
uint8_t rtt_sounding_n
Number of CS steps needed to achieve the accuracy requirements for RTT Sounding.
Definition conn.h:332
bool phase_based_nadm_sounding_supported
Phase-based normalized attack detector metric when a CS_SYNC with sounding sequence is received.
Definition conn.h:342
bool mode_3_supported
Mode-3.
Definition conn.h:314
bool chsel_alg_3c_supported
Subfeature: Channel Selection Algorithm #3c.
Definition conn.h:354
enum bt_conn_le_cs_capability_rtt_random_payload rtt_random_payload_precision
RTT Random Payload.
Definition conn.h:320
uint8_t rtt_aa_only_n
Number of CS steps needed to achieve the accuracy requirements for RTT AA Only.
Definition conn.h:326
uint8_t max_antenna_paths_supported
Maximum number of antenna paths.
Definition conn.h:308
enum bt_conn_le_cs_capability_rtt_sounding rtt_sounding_precision
RTT Sounding.
Definition conn.h:318
bool pbr_from_rtt_sounding_seq_supported
Subfeature: Phase-based Ranging from RTT sounding sequence.
Definition conn.h:356
uint8_t tx_snr_capability
Supported SNR levels used in RTT packets.
Definition conn.h:408
uint16_t max_consecutive_procedures_supported
Maximum number of consecutive CS procedures.
Definition conn.h:304
uint16_t t_ip2_times_supported
Optional T_IP2 time durations during CS steps.
Definition conn.h:378
Channel sounding configuration.
Definition conn.h:491
enum bt_conn_le_cs_main_mode main_mode_type
Main CS mode type.
Definition conn.h:495
enum bt_conn_le_cs_rtt_type rtt_type
RTT type.
Definition conn.h:512
enum bt_conn_le_cs_sync_phy cs_sync_phy
CS Sync PHY.
Definition conn.h:514
uint8_t t_fcs_time_us
Time in microseconds for frequency changes.
Definition conn.h:530
uint8_t min_main_mode_steps
Minimum number of CS main mode steps to be executed before a submode step is executed.
Definition conn.h:499
uint8_t main_mode_repetition
Number of main mode steps taken from the end of the last CS subevent to be repeated at the beginning ...
Definition conn.h:506
enum bt_conn_le_cs_sub_mode sub_mode_type
Sub CS mode type.
Definition conn.h:497
uint8_t channel_map[10]
Channel map used for CS procedure Channels n = 0, 1, 23, 24, 25, 77, and 78 are not allowed and shall...
Definition conn.h:538
enum bt_conn_le_cs_chsel_type channel_selection_type
Channel selection type.
Definition conn.h:520
uint8_t t_ip2_time_us
Interlude time in microseconds between the CS tones.
Definition conn.h:528
uint8_t mode_0_steps
Number of CS mode-0 steps to be included at the beginning of each CS subevent.
Definition conn.h:508
uint8_t channel_map_repetition
The number of times the Channel_Map field will be cycled through for non-mode-0 steps within a CS pro...
Definition conn.h:518
enum bt_conn_le_cs_ch3c_shape ch3c_shape
User-specified channel sequence shape.
Definition conn.h:522
uint8_t t_ip1_time_us
Interlude time in microseconds between the RTT packets.
Definition conn.h:526
uint8_t id
CS configuration ID.
Definition conn.h:493
enum bt_conn_le_cs_role role
CS role.
Definition conn.h:510
uint8_t t_pm_time_us
Time in microseconds for the phase measurement period of the CS tones.
Definition conn.h:532
uint8_t ch3c_jump
Number of channels skipped in each rising and falling sequence
Definition conn.h:524
uint8_t max_main_mode_steps
Maximum number of CS main mode steps to be executed before a submode step is executed.
Definition conn.h:501
Remote FAE Table for LE connections supporting CS.
Definition conn.h:412
uint8_t * remote_fae_table
Definition conn.h:413
uint8_t config_id
Definition conn.h:1570
enum bt_conn_le_cs_tone_antenna_config_selection tone_antenna_config_selection
Definition conn.h:1576
uint8_t subevents_per_event
Definition conn.h:1585
uint16_t event_interval
Definition conn.h:1593
uint16_t subevent_interval
Definition conn.h:1590
uint16_t procedure_interval
Definition conn.h:1596
uint16_t procedure_count
Definition conn.h:1599
enum bt_conn_le_cs_procedure_enable_state state
Definition conn.h:1573
uint16_t max_procedure_len
Definition conn.h:1602
uint32_t subevent_len
Definition conn.h:1582
int8_t selected_tx_power
Definition conn.h:1579
Subevent data for LE connections supporting CS.
Definition conn.h:579
uint16_t procedure_counter
CS procedure count associated with these results.
Definition conn.h:600
uint8_t num_antenna_paths
Number of antenna paths used during the phase measurement stage.
Definition conn.h:650
uint8_t num_steps_reported
Number of CS steps in the subevent.
Definition conn.h:653
enum bt_conn_le_cs_subevent_done_status subevent_done_status
Subevent status.
Definition conn.h:633
struct net_buf_simple * step_data_buf
Definition conn.h:660
uint16_t start_acl_conn_event
Starting ACL connection event counter.
Definition conn.h:594
enum bt_conn_le_cs_procedure_abort_reason procedure_abort_reason
Abort reason.
Definition conn.h:640
uint16_t frequency_compensation
Frequency compensation value in units of 0.01 ppm.
Definition conn.h:609
uint8_t abort_step
Step number, on which the subevent was aborted if subevent_done_status is BT_CONN_LE_CS_SUBEVENT_COMP...
Definition conn.h:658
uint8_t config_id
CS configuration identifier.
Definition conn.h:588
struct bt_conn_le_cs_subevent_result::@87 header
int8_t reference_power_level
Reference power level in dBm.
Definition conn.h:617
enum bt_conn_le_cs_procedure_done_status procedure_done_status
Procedure status.
Definition conn.h:619
enum bt_conn_le_cs_subevent_abort_reason subevent_abort_reason
Abort reason.
Definition conn.h:647
Connection data length information for LE connections.
Definition conn.h:149
uint16_t tx_max_time
Maximum Link Layer transmission payload time in us.
Definition conn.h:153
uint16_t rx_max_len
Maximum Link Layer reception payload size in bytes.
Definition conn.h:155
uint16_t tx_max_len
Maximum Link Layer transmission payload size in bytes.
Definition conn.h:151
uint16_t rx_max_time
Maximum Link Layer reception payload time in us.
Definition conn.h:157
Connection data length parameters for LE connections.
Definition conn.h:161
uint16_t tx_max_len
Maximum Link Layer transmission payload size in bytes.
Definition conn.h:163
uint16_t tx_max_time
Maximum Link Layer transmission payload time in us.
Definition conn.h:165
LE Connection Info Structure.
Definition conn.h:739
const bt_addr_le_t * dst
Destination (Remote) Identity Address or remote Resolvable Private Address (RPA) before identity has ...
Definition conn.h:745
const struct bt_conn_le_phy_info * phy
Definition conn.h:755
const bt_addr_le_t * remote
Remote device address used during connection setup.
Definition conn.h:749
const bt_addr_le_t * local
Local device address used during connection setup.
Definition conn.h:747
const bt_addr_le_t * src
Source (Local) Identity Address.
Definition conn.h:741
uint16_t interval
Connection interval.
Definition conn.h:750
uint16_t latency
Connection peripheral latency.
Definition conn.h:751
const struct bt_conn_le_data_len_info * data_len
Definition conn.h:760
uint16_t timeout
Connection supervision timeout.
Definition conn.h:752
LE Path Loss Monitoring Parameters Structure as defined in Core Spec.
Definition conn.h:1004
uint8_t high_threshold
High threshold for the path loss (dB).
Definition conn.h:1006
uint8_t low_threshold
Low threshold for the path loss (dB).
Definition conn.h:1010
uint16_t min_time_spent
Minimum time in number of connection events to be observed once the path loss crosses the threshold b...
Definition conn.h:1016
uint8_t high_hysteresis
Hysteresis value for the high threshold (dB).
Definition conn.h:1008
uint8_t low_hysteresis
Hysteresis value for the low threshold (dB).
Definition conn.h:1012
LE Path Loss Monitoring Threshold Change Report Structure.
Definition conn.h:992
enum bt_conn_le_path_loss_zone zone
Path Loss zone as documented in Core Spec.
Definition conn.h:995
uint8_t path_loss
Current path loss (dB).
Definition conn.h:998
Connection PHY information for LE connections.
Definition conn.h:82
uint8_t rx_phy
Connection transmit PHY.
Definition conn.h:84
uint8_t tx_phy
Definition conn.h:83
Preferred PHY parameters for LE connections.
Definition conn.h:100
uint16_t options
Connection PHY options.
Definition conn.h:101
uint8_t pref_rx_phy
Bitmask of preferred receive PHYs.
Definition conn.h:103
uint8_t pref_tx_phy
Bitmask of preferred transmit PHYs.
Definition conn.h:102
LE Connection Remote Info Structure.
Definition conn.h:863
const uint8_t * features
Remote LE feature set (bitmask).
Definition conn.h:866
Updated subrating connection parameters for LE connections.
Definition conn.h:231
uint16_t factor
Connection subrate factor.
Definition conn.h:238
uint16_t continuation_number
Number of underlying connection events to remain active after a packet containing a Link Layer PDU wi...
Definition conn.h:243
uint16_t peripheral_latency
Peripheral latency in units of subrated connection intervals.
Definition conn.h:245
uint16_t supervision_timeout
Connection Supervision timeout (N * 10 ms).
Definition conn.h:247
uint8_t status
HCI Status from LE Subrate Changed event.
Definition conn.h:236
Connection subrating parameters for LE connections.
Definition conn.h:200
uint16_t max_latency
Maximum Peripheral latency in units of subrated connection intervals.
Definition conn.h:206
uint16_t subrate_max
Maximum subrate factor.
Definition conn.h:204
uint16_t continuation_number
Minimum number of underlying connection events to remain active after a packet containing a Link Laye...
Definition conn.h:211
uint16_t supervision_timeout
Connection Supervision timeout (N * 10 ms).
Definition conn.h:216
uint16_t subrate_min
Minimum subrate factor.
Definition conn.h:202
Subrating information for LE connections.
Definition conn.h:220
uint16_t continuation_number
Number of underlying connection events to remain active after a packet containing a Link Layer PDU wi...
Definition conn.h:227
uint16_t factor
Connection subrate factor.
Definition conn.h:222
LE Transmit Power Reporting Structure.
Definition conn.h:934
enum bt_conn_le_tx_power_phy phy
Phy of Transmit power reporting.
Definition conn.h:942
int8_t delta
Change in transmit power level.
Definition conn.h:965
uint8_t reason
Reason for Transmit power reporting, as documented in Core Spec.
Definition conn.h:939
int8_t tx_power_level
Transmit power level.
Definition conn.h:952
uint8_t tx_power_level_flag
Bit 0: Transmit power level is at minimum level.
Definition conn.h:957
LE Transmit Power Level Structure.
Definition conn.h:920
int8_t max_level
Output: maximum transmit power level.
Definition conn.h:929
int8_t current_level
Output: current transmit power level.
Definition conn.h:926
uint8_t phy
Input: 1M, 2M, Coded S2 or Coded S8.
Definition conn.h:923
Info Structure for OOB pairing.
Definition conn.h:2110
struct bt_conn_oob_info::@93::@95 lesc
LE Secure Connections OOB pairing parameters.
@ BT_CONN_OOB_LE_LEGACY
LE legacy pairing.
Definition conn.h:2114
@ BT_CONN_OOB_LE_SC
LE SC pairing.
Definition conn.h:2117
@ BT_CONN_OOB_NO_DATA
No OOB data requested.
Definition conn.h:2135
@ BT_CONN_OOB_LOCAL_ONLY
Local OOB data requested.
Definition conn.h:2126
@ BT_CONN_OOB_REMOTE_ONLY
Remote OOB data requested.
Definition conn.h:2129
@ BT_CONN_OOB_BOTH_PEERS
Both local and remote OOB data requested.
Definition conn.h:2132
enum bt_conn_oob_info::@93::@95::@96 oob_config
OOB data configuration.
enum bt_conn_oob_info::@92 type
Type of OOB pairing method.
Pairing request and pairing response info structure.
Definition conn.h:2148
uint8_t resp_key_dist
Responder Key Distribution/Generation, Core Spec.
Definition conn.h:2169
uint8_t io_capability
IO Capability, Core Spec.
Definition conn.h:2150
uint8_t init_key_dist
Initiator Key Distribution/Generation, Core Spec.
Definition conn.h:2164
uint8_t max_enc_key_size
Maximum Encryption Key Size, Core Spec.
Definition conn.h:2159
uint8_t auth_req
AuthReq, Core Spec.
Definition conn.h:2156
uint8_t oob_data_flag
OOB data flag, Core Spec.
Definition conn.h:2153
Connection Remote Info Structure.
Definition conn.h:884
uint8_t version
Remote Link Layer version.
Definition conn.h:889
uint16_t subversion
Per-manufacturer unique revision.
Definition conn.h:895
uint16_t manufacturer
Remote manufacturer identifier.
Definition conn.h:892
uint8_t type
Connection Type.
Definition conn.h:886
struct bt_conn_br_remote_info br
BR/EDR connection remote info.
Definition conn.h:902
struct bt_conn_le_remote_info le
LE connection remote info.
Definition conn.h:899
Definition direction.h:165
Connection parameters for LE connections.
Definition conn.h:38
uint16_t latency
Definition conn.h:41
uint16_t interval_max
Definition conn.h:40
uint16_t timeout
Definition conn.h:42
uint16_t interval_min
Definition conn.h:39
LE Secure Connections pairing Out of Band data.
Definition bluetooth.h:2540
Security Info Structure.
Definition conn.h:832
uint8_t enc_key_size
Encryption Key Size.
Definition conn.h:836
bt_security_t level
Security Level.
Definition conn.h:834
enum bt_security_flag flags
Flags.
Definition conn.h:838
Simple network buffer representation.
Definition net_buf.h:89