Zephyr Project API  3.2.0
A Scalable Open Source RTOS
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
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
33struct bt_conn;
34
41};
42
50#define BT_LE_CONN_PARAM_INIT(int_min, int_max, lat, to) \
51{ \
52 .interval_min = (int_min), \
53 .interval_max = (int_max), \
54 .latency = (lat), \
55 .timeout = (to), \
56}
57
65#define BT_LE_CONN_PARAM(int_min, int_max, lat, to) \
66 ((struct bt_le_conn_param[]) { \
67 BT_LE_CONN_PARAM_INIT(int_min, int_max, lat, to) \
68 })
69
75#define BT_LE_CONN_PARAM_DEFAULT BT_LE_CONN_PARAM(BT_GAP_INIT_CONN_INT_MIN, \
76 BT_GAP_INIT_CONN_INT_MAX, \
77 0, 400)
78
83};
84
86enum {
89
92
95};
96
102};
103
109#define BT_CONN_LE_PHY_PARAM_INIT(_pref_tx_phy, _pref_rx_phy) \
110{ \
111 .options = BT_CONN_LE_PHY_OPT_NONE, \
112 .pref_tx_phy = (_pref_tx_phy), \
113 .pref_rx_phy = (_pref_rx_phy), \
114}
115
121#define BT_CONN_LE_PHY_PARAM(_pref_tx_phy, _pref_rx_phy) \
122 ((struct bt_conn_le_phy_param []) { \
123 BT_CONN_LE_PHY_PARAM_INIT(_pref_tx_phy, _pref_rx_phy) \
124 })
125
127#define BT_CONN_LE_PHY_PARAM_1M BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_1M, \
128 BT_GAP_LE_PHY_1M)
129
131#define BT_CONN_LE_PHY_PARAM_2M BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_2M, \
132 BT_GAP_LE_PHY_2M)
133
135#define BT_CONN_LE_PHY_PARAM_CODED BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_CODED, \
136 BT_GAP_LE_PHY_CODED)
137
139#define BT_CONN_LE_PHY_PARAM_ALL BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_1M | \
140 BT_GAP_LE_PHY_2M | \
141 BT_GAP_LE_PHY_CODED, \
142 BT_GAP_LE_PHY_1M | \
143 BT_GAP_LE_PHY_2M | \
144 BT_GAP_LE_PHY_CODED)
145
156};
157
164};
165
171#define BT_CONN_LE_DATA_LEN_PARAM_INIT(_tx_max_len, _tx_max_time) \
172{ \
173 .tx_max_len = (_tx_max_len), \
174 .tx_max_time = (_tx_max_time), \
175}
176
182#define BT_CONN_LE_DATA_LEN_PARAM(_tx_max_len, _tx_max_time) \
183 ((struct bt_conn_le_data_len_param[]) { \
184 BT_CONN_LE_DATA_LEN_PARAM_INIT(_tx_max_len, _tx_max_time) \
185 })
186
188#define BT_LE_DATA_LEN_PARAM_DEFAULT \
189 BT_CONN_LE_DATA_LEN_PARAM(BT_GAP_DATA_LEN_DEFAULT, \
190 BT_GAP_DATA_TIME_DEFAULT)
191
193#define BT_LE_DATA_LEN_PARAM_MAX \
194 BT_CONN_LE_DATA_LEN_PARAM(BT_GAP_DATA_LEN_MAX, \
195 BT_GAP_DATA_TIME_MAX)
196
208struct bt_conn *bt_conn_ref(struct bt_conn *conn);
209
216void bt_conn_unref(struct bt_conn *conn);
217
224void bt_conn_foreach(int type, void (*func)(struct bt_conn *conn, void *data),
225 void *data);
226
239struct bt_conn *bt_conn_lookup_addr_le(uint8_t id, const bt_addr_le_t *peer);
240
247const bt_addr_le_t *bt_conn_get_dst(const struct bt_conn *conn);
248
259uint8_t bt_conn_index(const struct bt_conn *conn);
260
262enum {
274};
275
292#if defined(CONFIG_BT_USER_PHY_UPDATE)
294#endif /* defined(CONFIG_BT_USER_PHY_UPDATE) */
295
296#if defined(CONFIG_BT_USER_DATA_LEN_UPDATE)
297 /* Connection maximum single fragment parameters */
299#endif /* defined(CONFIG_BT_USER_DATA_LEN_UPDATE) */
300};
301
302/* Multiply bt 1.25 to get MS */
303#define BT_CONN_INTERVAL_TO_MS(interval) ((interval) * 5 / 4)
304
307 const bt_addr_t *dst;
308};
309
310enum {
313};
314
324};
325
327typedef enum __packed {
343
350};
351
360};
361
363#define BT_CONN_ROLE_MASTER __DEPRECATED_MACRO BT_CONN_ROLE_CENTRAL
364#define BT_CONN_ROLE_SLAVE __DEPRECATED_MACRO BT_CONN_ROLE_PERIPHERAL
365
375 union {
380 };
385};
386
389
392};
393
396
399
402};
403
412
415
418
421
422 union {
425
428 };
429};
430
442};
443
446
449
452
455};
456
464int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info);
465
481int bt_conn_get_remote_info(struct bt_conn *conn,
482 struct bt_conn_remote_info *remote_info);
483
492int bt_conn_le_get_tx_power_level(struct bt_conn *conn,
493 struct bt_conn_le_tx_power *tx_power_level);
494
506int bt_conn_le_param_update(struct bt_conn *conn,
507 const struct bt_le_conn_param *param);
508
516int bt_conn_le_data_len_update(struct bt_conn *conn,
517 const struct bt_conn_le_data_len_param *param);
518
529int bt_conn_le_phy_update(struct bt_conn *conn,
530 const struct bt_conn_le_phy_param *param);
531
554int bt_conn_disconnect(struct bt_conn *conn, uint8_t reason);
555
556enum {
559
565
573};
574
576
579
582
585
591
597
606};
607
614#define BT_CONN_LE_CREATE_PARAM_INIT(_options, _interval, _window) \
615{ \
616 .options = (_options), \
617 .interval = (_interval), \
618 .window = (_window), \
619 .interval_coded = 0, \
620 .window_coded = 0, \
621 .timeout = 0, \
622}
623
630#define BT_CONN_LE_CREATE_PARAM(_options, _interval, _window) \
631 ((struct bt_conn_le_create_param[]) { \
632 BT_CONN_LE_CREATE_PARAM_INIT(_options, _interval, _window) \
633 })
634
638#define BT_CONN_LE_CREATE_CONN \
639 BT_CONN_LE_CREATE_PARAM(BT_CONN_LE_OPT_NONE, \
640 BT_GAP_SCAN_FAST_INTERVAL, \
641 BT_GAP_SCAN_FAST_INTERVAL)
642
647#define BT_CONN_LE_CREATE_CONN_AUTO \
648 BT_CONN_LE_CREATE_PARAM(BT_CONN_LE_OPT_NONE, \
649 BT_GAP_SCAN_FAST_INTERVAL, \
650 BT_GAP_SCAN_FAST_WINDOW)
651
677 const struct bt_conn_le_create_param *create_param,
678 const struct bt_le_conn_param *conn_param,
679 struct bt_conn **conn);
680
696int bt_conn_le_create_auto(const struct bt_conn_le_create_param *create_param,
697 const struct bt_le_conn_param *conn_param);
698
704
720 const struct bt_le_conn_param *param);
721
752int bt_conn_set_security(struct bt_conn *conn, bt_security_t sec);
753
758bt_security_t bt_conn_get_security(const struct bt_conn *conn);
759
769uint8_t bt_conn_enc_key_size(const struct bt_conn *conn);
770
774
777
780
783
786
789
792
795
798
801};
802
838 void (*connected)(struct bt_conn *conn, uint8_t err);
839
857 void (*disconnected)(struct bt_conn *conn, uint8_t reason);
858
883 bool (*le_param_req)(struct bt_conn *conn,
884 struct bt_le_conn_param *param);
885
896 void (*le_param_updated)(struct bt_conn *conn, uint16_t interval,
897 uint16_t latency, uint16_t timeout);
898#if defined(CONFIG_BT_SMP)
908 void (*identity_resolved)(struct bt_conn *conn,
909 const bt_addr_le_t *rpa,
910 const bt_addr_le_t *identity);
911#endif /* CONFIG_BT_SMP */
912#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
929 void (*security_changed)(struct bt_conn *conn, bt_security_t level,
930 enum bt_security_err err);
931#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR) */
932
933#if defined(CONFIG_BT_REMOTE_INFO)
942 void (*remote_info_available)(struct bt_conn *conn,
943 struct bt_conn_remote_info *remote_info);
944#endif /* defined(CONFIG_BT_REMOTE_INFO) */
945
946#if defined(CONFIG_BT_USER_PHY_UPDATE)
955 void (*le_phy_updated)(struct bt_conn *conn,
956 struct bt_conn_le_phy_info *param);
957#endif /* defined(CONFIG_BT_USER_PHY_UPDATE) */
958
959#if defined(CONFIG_BT_USER_DATA_LEN_UPDATE)
968 void (*le_data_len_updated)(struct bt_conn *conn,
969 struct bt_conn_le_data_len_info *info);
970#endif /* defined(CONFIG_BT_USER_DATA_LEN_UPDATE) */
971
972#if defined(CONFIG_BT_DF_CONNECTION_CTE_RX)
979 void (*cte_report_cb)(struct bt_conn *conn,
980 const struct bt_df_conn_iq_samples_report *iq_report);
981#endif /* CONFIG_BT_DF_CONNECTION_CTE_RX */
982
983 struct bt_conn_cb *_next;
984};
985
993
999#define BT_CONN_CB_DEFINE(_name) \
1000 static const STRUCT_SECTION_ITERABLE(bt_conn_cb, \
1001 _CONCAT(bt_conn_cb_, \
1002 _name))
1003
1014void bt_set_bondable(bool enable);
1015
1024void bt_set_oob_data_flag(bool enable);
1025
1037int bt_le_oob_set_legacy_tk(struct bt_conn *conn, const uint8_t *tk);
1038
1057int bt_le_oob_set_sc_data(struct bt_conn *conn,
1058 const struct bt_le_oob_sc_data *oobd_local,
1059 const struct bt_le_oob_sc_data *oobd_remote);
1060
1076int bt_le_oob_get_sc_data(struct bt_conn *conn,
1077 const struct bt_le_oob_sc_data **oobd_local,
1078 const struct bt_le_oob_sc_data **oobd_remote);
1079
1084#define BT_PASSKEY_INVALID 0xffffffff
1085
1099int bt_passkey_set(unsigned int passkey);
1100
1104 enum {
1107
1111
1112 union {
1114 struct {
1116 enum {
1119
1122
1125
1130 };
1131};
1132
1133#if defined(CONFIG_BT_SMP_APP_PAIRING_ACCEPT)
1143
1146
1149
1152
1157
1162};
1163#endif /* CONFIG_BT_SMP_APP_PAIRING_ACCEPT */
1164
1167#if defined(CONFIG_BT_SMP_APP_PAIRING_ACCEPT)
1195 enum bt_security_err (*pairing_accept)(struct bt_conn *conn,
1196 const struct bt_conn_pairing_feat *const feat);
1197#endif /* CONFIG_BT_SMP_APP_PAIRING_ACCEPT */
1198
1217 void (*passkey_display)(struct bt_conn *conn, unsigned int passkey);
1218
1237 void (*passkey_entry)(struct bt_conn *conn);
1238
1260 void (*passkey_confirm)(struct bt_conn *conn, unsigned int passkey);
1261
1278 void (*oob_data_request)(struct bt_conn *conn,
1279 struct bt_conn_oob_info *info);
1280
1293 void (*cancel)(struct bt_conn *conn);
1294
1313 void (*pairing_confirm)(struct bt_conn *conn);
1314
1315#if defined(CONFIG_BT_BREDR)
1334 void (*pincode_entry)(struct bt_conn *conn, bool highsec);
1335#endif
1336};
1337
1349 void (*pairing_complete)(struct bt_conn *conn, bool bonded);
1350
1356 void (*pairing_failed)(struct bt_conn *conn,
1357 enum bt_security_err reason);
1358
1367 void (*bond_deleted)(uint8_t id, const bt_addr_le_t *peer);
1368
1371};
1372
1383
1398int bt_conn_auth_cb_overlay(struct bt_conn *conn, const struct bt_conn_auth_cb *cb);
1399
1410
1420
1431int bt_conn_auth_passkey_entry(struct bt_conn *conn, unsigned int passkey);
1432
1441int bt_conn_auth_cancel(struct bt_conn *conn);
1442
1452int bt_conn_auth_passkey_confirm(struct bt_conn *conn);
1453
1463int bt_conn_auth_pairing_confirm(struct bt_conn *conn);
1464
1475int bt_conn_auth_pincode_entry(struct bt_conn *conn, const char *pin);
1476
1480};
1481
1486#define BT_BR_CONN_PARAM_INIT(role_switch) \
1487{ \
1488 .allow_role_switch = (role_switch), \
1489}
1490
1495#define BT_BR_CONN_PARAM(role_switch) \
1496 ((struct bt_br_conn_param[]) { \
1497 BT_BR_CONN_PARAM_INIT(role_switch) \
1498 })
1499
1503#define BT_BR_CONN_PARAM_DEFAULT BT_BR_CONN_PARAM(true)
1504
1505
1518struct bt_conn *bt_conn_create_br(const bt_addr_t *peer,
1519 const struct bt_br_conn_param *param);
1520
1532struct bt_conn *bt_conn_create_sco(const bt_addr_t *peer);
1533
1534#ifdef __cplusplus
1535}
1536#endif
1537
1542#endif /* ZEPHYR_INCLUDE_BLUETOOTH_CONN_H_ */
Bluetooth device address definitions and utilities.
Bluetooth subsystem core APIs.
ZTEST_BMEM int timeout
Definition: main.c:31
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.
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.
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_conn_disconnect(struct bt_conn *conn, uint8_t reason)
Disconnect from a remote device or cancel pending connection.
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_get_info(const struct bt_conn *conn, struct bt_conn_info *info)
Get connection info.
bt_security_flag
Definition: conn.h:345
int bt_passkey_set(unsigned int passkey)
Set a fixed passkey to be used for pairing.
void bt_conn_cb_register(struct bt_conn_cb *cb)
Register connection callbacks.
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.
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.
void bt_conn_foreach(int type, void(*func)(struct bt_conn *conn, void *data), void *data)
Iterate through all existing connections.
int bt_conn_create_auto_stop(void)
Stop automatic connect creation.
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:431
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.
void bt_set_oob_data_flag(bool enable)
Allow/disallow remote OOB data to be used for pairing.
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.
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.
bt_conn_state
Definition: conn.h:315
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.
bt_security_err
Definition: conn.h:771
int bt_conn_le_param_update(struct bt_conn *conn, const struct bt_le_conn_param *param)
Update the connection parameters.
int bt_conn_auth_passkey_confirm(struct bt_conn *conn)
Reply if passkey was confirmed to match by user.
struct bt_conn * bt_conn_create_sco(const bt_addr_t *peer)
Initiate an SCO connection to a remote device.
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.
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
Definition: conn.h:327
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.
uint8_t bt_conn_enc_key_size(const struct bt_conn *conn)
Get encryption key size.
@ BT_SECURITY_FLAG_OOB
Definition: conn.h:349
@ BT_SECURITY_FLAG_SC
Definition: conn.h:347
@ BT_CONN_LE_TX_POWER_PHY_NONE
Definition: conn.h:433
@ BT_CONN_LE_TX_POWER_PHY_CODED_S2
Definition: conn.h:441
@ BT_CONN_LE_TX_POWER_PHY_CODED_S8
Definition: conn.h:439
@ BT_CONN_LE_TX_POWER_PHY_1M
Definition: conn.h:435
@ BT_CONN_LE_TX_POWER_PHY_2M
Definition: conn.h:437
@ BT_CONN_LE_PHY_OPT_CODED_S2
Definition: conn.h:91
@ BT_CONN_LE_PHY_OPT_CODED_S8
Definition: conn.h:94
@ BT_CONN_LE_PHY_OPT_NONE
Definition: conn.h:88
@ BT_CONN_STATE_CONNECTING
Definition: conn.h:319
@ BT_CONN_STATE_CONNECTED
Definition: conn.h:321
@ BT_CONN_STATE_DISCONNECTED
Definition: conn.h:317
@ BT_CONN_STATE_DISCONNECTING
Definition: conn.h:323
@ BT_SECURITY_ERR_OOB_NOT_AVAILABLE
Definition: conn.h:782
@ BT_SECURITY_ERR_AUTH_REQUIREMENT
Definition: conn.h:785
@ BT_SECURITY_ERR_KEY_REJECTED
Definition: conn.h:797
@ BT_SECURITY_ERR_UNSPECIFIED
Definition: conn.h:800
@ BT_SECURITY_ERR_INVALID_PARAM
Definition: conn.h:794
@ BT_SECURITY_ERR_PAIR_NOT_SUPPORTED
Definition: conn.h:788
@ BT_SECURITY_ERR_AUTH_FAIL
Definition: conn.h:776
@ BT_SECURITY_ERR_PIN_OR_KEY_MISSING
Definition: conn.h:779
@ BT_SECURITY_ERR_SUCCESS
Definition: conn.h:773
@ BT_SECURITY_ERR_PAIR_NOT_ALLOWED
Definition: conn.h:791
@ BT_CONN_ROLE_PERIPHERAL
Definition: conn.h:312
@ BT_CONN_ROLE_CENTRAL
Definition: conn.h:311
@ BT_SECURITY_L4
Definition: conn.h:337
@ BT_SECURITY_L0
Definition: conn.h:329
@ BT_SECURITY_L3
Definition: conn.h:335
@ BT_SECURITY_FORCE_PAIR
Definition: conn.h:341
@ BT_SECURITY_L1
Definition: conn.h:331
@ BT_SECURITY_L2
Definition: conn.h:333
@ BT_CONN_TYPE_LE
Definition: conn.h:264
@ BT_CONN_TYPE_ALL
Definition: conn.h:272
@ BT_CONN_TYPE_BR
Definition: conn.h:266
@ BT_CONN_TYPE_ISO
Definition: conn.h:270
@ BT_CONN_TYPE_SCO
Definition: conn.h:268
@ BT_CONN_LE_OPT_NONE
Definition: conn.h:558
@ BT_CONN_LE_OPT_NO_1M
Disable LE 1M PHY.
Definition: conn.h:572
@ BT_CONN_LE_OPT_CODED
Enable LE Coded PHY.
Definition: conn.h:564
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
Bluetooth Host Control Interface status codes.
struct _snode sys_snode_t
Definition: slist.h:33
#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
Definition: addr.h:48
Definition: addr.h:39
Definition: conn.h:1478
bool allow_role_switch
Definition: conn.h:1479
Definition: conn.h:1166
void(* passkey_entry)(struct bt_conn *conn)
Request the user to enter a passkey.
Definition: conn.h:1237
void(* passkey_display)(struct bt_conn *conn, unsigned int passkey)
Display a passkey to the user.
Definition: conn.h:1217
void(* passkey_confirm)(struct bt_conn *conn, unsigned int passkey)
Request the user to confirm a passkey.
Definition: conn.h:1260
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:1195
void(* pincode_entry)(struct bt_conn *conn, bool highsec)
Request the user to enter a passkey.
Definition: conn.h:1334
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:1278
void(* pairing_confirm)(struct bt_conn *conn)
Request confirmation for an incoming pairing.
Definition: conn.h:1313
void(* cancel)(struct bt_conn *conn)
Cancel the ongoing user request.
Definition: conn.h:1293
Definition: conn.h:1339
void(* pairing_failed)(struct bt_conn *conn, enum bt_security_err reason)
notify that pairing process has failed.
Definition: conn.h:1356
void(* pairing_complete)(struct bt_conn *conn, bool bonded)
notify that pairing procedure was complete.
Definition: conn.h:1349
void(* bond_deleted)(uint8_t id, const bt_addr_le_t *peer)
Notify that bond has been deleted.
Definition: conn.h:1367
sys_snode_t node
Definition: conn.h:1370
Definition: conn.h:306
const bt_addr_t * dst
Definition: conn.h:307
Definition: conn.h:395
uint8_t num_pages
Definition: conn.h:401
const uint8_t * features
Definition: conn.h:398
Connection callback structure.
Definition: conn.h:813
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:896
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:968
bool(* le_param_req)(struct bt_conn *conn, struct bt_le_conn_param *param)
LE connection parameter update request.
Definition: conn.h:883
void(* disconnected)(struct bt_conn *conn, uint8_t reason)
A connection has been disconnected.
Definition: conn.h:857
void(* connected)(struct bt_conn *conn, uint8_t err)
A new connection has been established.
Definition: conn.h:838
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:955
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:929
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:908
void(* remote_info_available)(struct bt_conn *conn, struct bt_conn_remote_info *remote_info)
Remote information procedures has completed.
Definition: conn.h:942
Definition: conn.h:367
uint8_t id
Definition: conn.h:373
struct bt_conn_le_info le
Definition: conn.h:377
uint8_t type
Definition: conn.h:369
struct bt_conn_br_info br
Definition: conn.h:379
uint8_t role
Definition: conn.h:371
struct bt_security_info security
Definition: conn.h:384
enum bt_conn_state state
Definition: conn.h:382
Definition: conn.h:575
uint16_t interval_coded
Scan interval LE Coded PHY (N * 0.625 MS)
Definition: conn.h:590
uint16_t window
Definition: conn.h:584
uint32_t options
Definition: conn.h:578
uint16_t timeout
Connection initiation timeout (N * 10 MS)
Definition: conn.h:605
uint16_t interval
Definition: conn.h:581
uint16_t window_coded
Scan window LE Coded PHY (N * 0.625 MS)
Definition: conn.h:596
Definition: conn.h:147
uint16_t tx_max_time
Definition: conn.h:151
uint16_t rx_max_len
Definition: conn.h:153
uint16_t tx_max_len
Definition: conn.h:149
uint16_t rx_max_time
Definition: conn.h:155
Definition: conn.h:159
uint16_t tx_max_len
Definition: conn.h:161
uint16_t tx_max_time
Definition: conn.h:163
Definition: conn.h:277
const bt_addr_le_t * dst
Definition: conn.h:283
const struct bt_conn_le_phy_info * phy
Definition: conn.h:293
const bt_addr_le_t * remote
Definition: conn.h:287
const bt_addr_le_t * local
Definition: conn.h:285
const bt_addr_le_t * src
Definition: conn.h:279
uint16_t interval
Definition: conn.h:288
uint16_t latency
Definition: conn.h:289
const struct bt_conn_le_data_len_info * data_len
Definition: conn.h:298
uint16_t timeout
Definition: conn.h:290
Definition: conn.h:80
uint8_t rx_phy
Definition: conn.h:82
uint8_t tx_phy
Definition: conn.h:81
Definition: conn.h:98
uint16_t options
Definition: conn.h:99
uint8_t pref_rx_phy
Definition: conn.h:101
uint8_t pref_tx_phy
Definition: conn.h:100
Definition: conn.h:388
const uint8_t * features
Definition: conn.h:391
Definition: conn.h:445
int8_t max_level
Definition: conn.h:454
int8_t current_level
Definition: conn.h:451
uint8_t phy
Definition: conn.h:448
Definition: conn.h:1102
enum bt_conn_oob_info::@54 type
@ BT_CONN_OOB_LE_LEGACY
Definition: conn.h:1106
@ BT_CONN_OOB_LE_SC
Definition: conn.h:1109
@ BT_CONN_OOB_NO_DATA
Definition: conn.h:1127
@ BT_CONN_OOB_LOCAL_ONLY
Definition: conn.h:1118
@ BT_CONN_OOB_REMOTE_ONLY
Definition: conn.h:1121
@ BT_CONN_OOB_BOTH_PEERS
Definition: conn.h:1124
struct bt_conn_oob_info::@55::@57 lesc
enum bt_conn_oob_info::@55::@57::@58 oob_config
Pairing request and pairing response info structure.
Definition: conn.h:1140
uint8_t resp_key_dist
Definition: conn.h:1161
uint8_t io_capability
Definition: conn.h:1142
uint8_t init_key_dist
Definition: conn.h:1156
uint8_t max_enc_key_size
Definition: conn.h:1151
uint8_t auth_req
Definition: conn.h:1148
uint8_t oob_data_flag
Definition: conn.h:1145
Connection Remote Info Structure.
Definition: conn.h:409
uint8_t version
Definition: conn.h:414
uint16_t subversion
Definition: conn.h:420
uint16_t manufacturer
Definition: conn.h:417
uint8_t type
Definition: conn.h:411
struct bt_conn_br_remote_info br
Definition: conn.h:427
struct bt_conn_le_remote_info le
Definition: conn.h:424
Definition: direction.h:163
Definition: conn.h:36
uint16_t latency
Definition: conn.h:39
uint16_t interval_max
Definition: conn.h:38
uint16_t timeout
Definition: conn.h:40
uint16_t interval_min
Definition: conn.h:37
Definition: bluetooth.h:2071
Definition: conn.h:353
uint8_t enc_key_size
Definition: conn.h:357
bt_security_t level
Definition: conn.h:355
enum bt_security_flag flags
Definition: conn.h:359
static fdata_t data[2]
Definition: test_fifo_contexts.c:15