Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bluetooth.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2017 Nordic Semiconductor ASA
7 * Copyright (c) 2015-2016 Intel Corporation
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_BLUETOOTH_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_BLUETOOTH_H_
13
21#include <stdbool.h>
22#include <string.h>
23
24#include <zephyr/sys/util.h>
25#include <zephyr/net/buf.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
48#define BT_ID_DEFAULT 0
49
51struct bt_le_ext_adv;
52
54struct bt_le_per_adv_sync;
55
56/* Don't require everyone to include conn.h */
57struct bt_conn;
58
59/* Don't require everyone to include iso.h */
60struct bt_iso_biginfo;
61
62/* Don't require everyone to include direction.h */
64
68};
69
72 struct bt_conn *conn;
73};
74
78};
79
83
86};
87
91
99
102
105
108
111};
112
125 void (*sent)(struct bt_le_ext_adv *adv,
126 struct bt_le_ext_adv_sent_info *info);
127
137 void (*connected)(struct bt_le_ext_adv *adv,
138 struct bt_le_ext_adv_connected_info *info);
139
150 void (*scanned)(struct bt_le_ext_adv *adv,
151 struct bt_le_ext_adv_scanned_info *info);
152
153#if defined(CONFIG_BT_PRIVACY)
170 bool (*rpa_expired)(struct bt_le_ext_adv *adv);
171#endif /* defined(CONFIG_BT_PRIVACY) */
172
173#if defined(CONFIG_BT_PER_ADV_RSP)
183 void (*pawr_data_request)(struct bt_le_ext_adv *adv,
184 const struct bt_le_per_adv_data_request *request);
194 void (*pawr_response)(struct bt_le_ext_adv *adv, struct bt_le_per_adv_response_info *info,
195 struct net_buf_simple *buf);
196
197#endif /* defined(CONFIG_BT_PER_ADV_RSP) */
198};
199
206typedef void (*bt_ready_cb_t)(int err);
207
228
238int bt_disable(void);
239
245bool bt_is_ready(void);
246
264int bt_set_name(const char *name);
265
273const char *bt_get_name(void);
274
286
301int bt_set_appearance(uint16_t new_appearance);
302
323void bt_id_get(bt_addr_le_t *addrs, size_t *count);
324
372
406
424
436#define BT_DATA_SERIALIZED_SIZE(data_len) ((data_len) + 2)
437
445struct bt_data {
448 const uint8_t *data;
449};
450
461#define BT_DATA(_type, _data, _data_len) \
462 { \
463 .type = (_type), \
464 .data_len = (_data_len), \
465 .data = (const uint8_t *)(_data), \
466 }
467
477#define BT_DATA_BYTES(_type, _bytes...) \
478 BT_DATA(_type, ((uint8_t []) { _bytes }), \
479 sizeof((uint8_t []) { _bytes }))
480
491size_t bt_data_get_len(const struct bt_data data[], size_t data_count);
492
507size_t bt_data_serialize(const struct bt_data *input, uint8_t *output);
508
510enum {
513
523
539
551
577
585
599
604
607
612
623
645
661
673
680
687
690
693
696
709
723};
724
736
743
753
756
765
774
791};
792
793
795enum {
798
805
812};
813
822
830
833
834#if defined(CONFIG_BT_PER_ADV_RSP)
840 uint8_t num_subevents;
841
847 uint8_t subevent_interval;
848
854 uint8_t response_slot_delay;
855
861 uint8_t response_slot_spacing;
862
868 uint8_t num_response_slots;
869#endif /* CONFIG_BT_PER_ADV_RSP */
870};
871
881#define BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
882{ \
883 .id = BT_ID_DEFAULT, \
884 .sid = 0, \
885 .secondary_max_skip = 0, \
886 .options = (_options), \
887 .interval_min = (_int_min), \
888 .interval_max = (_int_max), \
889 .peer = (_peer), \
890}
891
901#define BT_LE_ADV_PARAM(_options, _int_min, _int_max, _peer) \
902 ((struct bt_le_adv_param[]) { \
903 BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
904 })
905
906#define BT_LE_ADV_CONN_DIR(_peer) BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
907 BT_LE_ADV_OPT_ONE_TIME, 0, 0,\
908 _peer)
909
910
911#define BT_LE_ADV_CONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, \
912 BT_GAP_ADV_FAST_INT_MIN_2, \
913 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
914
919#define BT_LE_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
920 BT_LE_ADV_OPT_USE_NAME, \
921 BT_GAP_ADV_FAST_INT_MIN_2, \
922 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
923 __DEPRECATED_MACRO
924
929#define BT_LE_ADV_CONN_NAME_AD BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
930 BT_LE_ADV_OPT_USE_NAME | \
931 BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \
932 BT_GAP_ADV_FAST_INT_MIN_2, \
933 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
934 __DEPRECATED_MACRO
935
936#define BT_LE_ADV_CONN_DIR_LOW_DUTY(_peer) \
937 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME | \
938 BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY, \
939 BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, \
940 _peer)
941
943#define BT_LE_ADV_NCONN BT_LE_ADV_PARAM(0, BT_GAP_ADV_FAST_INT_MIN_2, \
944 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
945
952#define BT_LE_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_NAME, \
953 BT_GAP_ADV_FAST_INT_MIN_2, \
954 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
955 __DEPRECATED_MACRO
956
958#define BT_LE_ADV_NCONN_IDENTITY BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, \
959 BT_GAP_ADV_FAST_INT_MIN_2, \
960 BT_GAP_ADV_FAST_INT_MAX_2, \
961 NULL)
962
964#define BT_LE_EXT_ADV_CONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
965 BT_LE_ADV_OPT_CONNECTABLE, \
966 BT_GAP_ADV_FAST_INT_MIN_2, \
967 BT_GAP_ADV_FAST_INT_MAX_2, \
968 NULL)
969
976#define BT_LE_EXT_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
977 BT_LE_ADV_OPT_CONNECTABLE | \
978 BT_LE_ADV_OPT_USE_NAME, \
979 BT_GAP_ADV_FAST_INT_MIN_2, \
980 BT_GAP_ADV_FAST_INT_MAX_2, \
981 NULL) \
982 __DEPRECATED_MACRO
983
985#define BT_LE_EXT_ADV_SCAN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
986 BT_LE_ADV_OPT_SCANNABLE, \
987 BT_GAP_ADV_FAST_INT_MIN_2, \
988 BT_GAP_ADV_FAST_INT_MAX_2, \
989 NULL)
990
997#define BT_LE_EXT_ADV_SCAN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
998 BT_LE_ADV_OPT_SCANNABLE | \
999 BT_LE_ADV_OPT_USE_NAME, \
1000 BT_GAP_ADV_FAST_INT_MIN_2, \
1001 BT_GAP_ADV_FAST_INT_MAX_2, \
1002 NULL) \
1003 __DEPRECATED_MACRO
1004
1006#define BT_LE_EXT_ADV_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV, \
1007 BT_GAP_ADV_FAST_INT_MIN_2, \
1008 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1009
1016#define BT_LE_EXT_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1017 BT_LE_ADV_OPT_USE_NAME, \
1018 BT_GAP_ADV_FAST_INT_MIN_2, \
1019 BT_GAP_ADV_FAST_INT_MAX_2, \
1020 NULL) \
1021 __DEPRECATED_MACRO
1022
1024#define BT_LE_EXT_ADV_NCONN_IDENTITY \
1025 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1026 BT_LE_ADV_OPT_USE_IDENTITY, \
1027 BT_GAP_ADV_FAST_INT_MIN_2, \
1028 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1029
1031#define BT_LE_EXT_ADV_CODED_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1032 BT_LE_ADV_OPT_CODED, \
1033 BT_GAP_ADV_FAST_INT_MIN_2, \
1034 BT_GAP_ADV_FAST_INT_MAX_2, \
1035 NULL)
1036
1044#define BT_LE_EXT_ADV_CODED_NCONN_NAME \
1045 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1046 BT_LE_ADV_OPT_USE_NAME, \
1047 BT_GAP_ADV_FAST_INT_MIN_2, \
1048 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1049 __DEPRECATED_MACRO
1050
1054#define BT_LE_EXT_ADV_CODED_NCONN_IDENTITY \
1055 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1056 BT_LE_ADV_OPT_USE_IDENTITY, \
1057 BT_GAP_ADV_FAST_INT_MIN_2, \
1058 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1059
1066#define BT_LE_EXT_ADV_START_PARAM_INIT(_timeout, _n_evts) \
1067{ \
1068 .timeout = (_timeout), \
1069 .num_events = (_n_evts), \
1070}
1071
1078#define BT_LE_EXT_ADV_START_PARAM(_timeout, _n_evts) \
1079 ((struct bt_le_ext_adv_start_param[]) { \
1080 BT_LE_EXT_ADV_START_PARAM_INIT((_timeout), (_n_evts)) \
1081 })
1082
1083#define BT_LE_EXT_ADV_START_DEFAULT BT_LE_EXT_ADV_START_PARAM(0, 0)
1084
1092#define BT_LE_PER_ADV_PARAM_INIT(_int_min, _int_max, _options) \
1093{ \
1094 .interval_min = (_int_min), \
1095 .interval_max = (_int_max), \
1096 .options = (_options), \
1097}
1098
1106#define BT_LE_PER_ADV_PARAM(_int_min, _int_max, _options) \
1107 ((struct bt_le_per_adv_param[]) { \
1108 BT_LE_PER_ADV_PARAM_INIT(_int_min, _int_max, _options) \
1109 })
1110
1111#define BT_LE_PER_ADV_DEFAULT BT_LE_PER_ADV_PARAM(BT_GAP_PER_ADV_SLOW_INT_MIN, \
1112 BT_GAP_PER_ADV_SLOW_INT_MAX, \
1113 BT_LE_PER_ADV_OPT_NONE)
1114
1145int bt_le_adv_start(const struct bt_le_adv_param *param,
1146 const struct bt_data *ad, size_t ad_len,
1147 const struct bt_data *sd, size_t sd_len);
1148
1161int bt_le_adv_update_data(const struct bt_data *ad, size_t ad_len,
1162 const struct bt_data *sd, size_t sd_len);
1163
1172
1188 const struct bt_le_ext_adv_cb *cb,
1189 struct bt_le_ext_adv **adv);
1190
1213};
1214
1228int bt_le_ext_adv_start(struct bt_le_ext_adv *adv,
1229 struct bt_le_ext_adv_start_param *param);
1230
1241int bt_le_ext_adv_stop(struct bt_le_ext_adv *adv);
1242
1277int bt_le_ext_adv_set_data(struct bt_le_ext_adv *adv,
1278 const struct bt_data *ad, size_t ad_len,
1279 const struct bt_data *sd, size_t sd_len);
1280
1297int bt_le_ext_adv_update_param(struct bt_le_ext_adv *adv,
1298 const struct bt_le_adv_param *param);
1299
1308int bt_le_ext_adv_delete(struct bt_le_ext_adv *adv);
1309
1321uint8_t bt_le_ext_adv_get_index(struct bt_le_ext_adv *adv);
1322
1325 /* Local identity */
1327
1330
1333};
1334
1343int bt_le_ext_adv_get_info(const struct bt_le_ext_adv *adv,
1344 struct bt_le_ext_adv_info *info);
1345
1359typedef void bt_le_scan_cb_t(const bt_addr_le_t *addr, int8_t rssi,
1360 uint8_t adv_type, struct net_buf_simple *buf);
1361
1374int bt_le_per_adv_set_param(struct bt_le_ext_adv *adv,
1375 const struct bt_le_per_adv_param *param);
1376
1390int bt_le_per_adv_set_data(const struct bt_le_ext_adv *adv,
1391 const struct bt_data *ad, size_t ad_len);
1392
1396
1399
1402
1404 const struct net_buf_simple *data;
1405};
1406
1422int bt_le_per_adv_set_subevent_data(const struct bt_le_ext_adv *adv, uint8_t num_subevents,
1423 const struct bt_le_per_adv_subevent_data_params *params);
1424
1442int bt_le_per_adv_start(struct bt_le_ext_adv *adv);
1443
1455int bt_le_per_adv_stop(struct bt_le_ext_adv *adv);
1456
1460
1463
1466
1469
1472
1479
1486 struct bt_conn *conn;
1487#if defined(CONFIG_BT_PER_ADV_SYNC_RSP)
1489 uint8_t num_subevents;
1490
1492 uint8_t subevent_interval;
1493
1495 uint8_t response_slot_delay;
1496
1498 uint8_t response_slot_spacing;
1499
1500#endif /* CONFIG_BT_PER_ADV_SYNC_RSP */
1501};
1502
1506
1509
1512};
1513
1517
1520
1523
1526
1529#if defined(CONFIG_BT_PER_ADV_SYNC_RSP)
1531 uint16_t periodic_event_counter;
1532
1534 uint8_t subevent;
1535#endif /* CONFIG_BT_PER_ADV_SYNC_RSP */
1536};
1537
1538
1542};
1543
1555 void (*synced)(struct bt_le_per_adv_sync *sync,
1556 struct bt_le_per_adv_sync_synced_info *info);
1557
1567 void (*term)(struct bt_le_per_adv_sync *sync,
1568 const struct bt_le_per_adv_sync_term_info *info);
1569
1583 void (*recv)(struct bt_le_per_adv_sync *sync,
1584 const struct bt_le_per_adv_sync_recv_info *info,
1585 struct net_buf_simple *buf);
1586
1597 void (*state_changed)(struct bt_le_per_adv_sync *sync,
1598 const struct bt_le_per_adv_sync_state_info *info);
1599
1610 void (*biginfo)(struct bt_le_per_adv_sync *sync, const struct bt_iso_biginfo *biginfo);
1611
1619 void (*cte_report_cb)(struct bt_le_per_adv_sync *sync,
1620 struct bt_df_per_adv_sync_iq_samples_report const *info);
1621
1623};
1624
1626enum {
1629
1637
1644
1647
1650
1653
1656
1659};
1660
1669
1677
1680
1689
1697};
1698
1710uint8_t bt_le_per_adv_sync_get_index(struct bt_le_per_adv_sync *per_adv_sync);
1711
1724struct bt_le_per_adv_sync *bt_le_per_adv_sync_lookup_index(uint8_t index);
1725
1730
1733
1736
1739};
1740
1749int bt_le_per_adv_sync_get_info(struct bt_le_per_adv_sync *per_adv_sync,
1750 struct bt_le_per_adv_sync_info *info);
1751
1760struct bt_le_per_adv_sync *bt_le_per_adv_sync_lookup_addr(const bt_addr_le_t *adv_addr,
1761 uint8_t sid);
1762
1780 struct bt_le_per_adv_sync **out_sync);
1781
1798int bt_le_per_adv_sync_delete(struct bt_le_per_adv_sync *per_adv_sync);
1799
1812
1822int bt_le_per_adv_sync_recv_enable(struct bt_le_per_adv_sync *per_adv_sync);
1823
1833int bt_le_per_adv_sync_recv_disable(struct bt_le_per_adv_sync *per_adv_sync);
1834
1836enum {
1839
1846
1854
1862
1865
1873
1881};
1882
1891
1899
1902};
1903
1916int bt_le_per_adv_sync_transfer(const struct bt_le_per_adv_sync *per_adv_sync,
1917 const struct bt_conn *conn,
1918 uint16_t service_data);
1919
1920
1933int bt_le_per_adv_set_info_transfer(const struct bt_le_ext_adv *adv,
1934 const struct bt_conn *conn,
1935 uint16_t service_data);
1936
1951 const struct bt_conn *conn,
1952 const struct bt_le_per_adv_sync_transfer_param *param);
1953
1967int bt_le_per_adv_sync_transfer_unsubscribe(const struct bt_conn *conn);
1968
1983
1996
2005
2006
2007enum {
2010
2013
2016
2019
2026};
2027
2028#define BT_LE_SCAN_OPT_FILTER_WHITELIST __DEPRECATED_MACRO BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST
2029
2030enum {
2033
2042};
2043
2048
2051
2054
2057
2065
2072
2079};
2080
2090
2093
2096
2099
2109
2119
2126
2129
2132};
2133
2136
2143 void (*recv)(const struct bt_le_scan_recv_info *info,
2144 struct net_buf_simple *buf);
2145
2147 void (*timeout)(void);
2148
2150};
2151
2161#define BT_LE_SCAN_PARAM_INIT(_type, _options, _interval, _window) \
2162{ \
2163 .type = (_type), \
2164 .options = (_options), \
2165 .interval = (_interval), \
2166 .window = (_window), \
2167 .timeout = 0, \
2168 .interval_coded = 0, \
2169 .window_coded = 0, \
2170}
2171
2181#define BT_LE_SCAN_PARAM(_type, _options, _interval, _window) \
2182 ((struct bt_le_scan_param[]) { \
2183 BT_LE_SCAN_PARAM_INIT(_type, _options, _interval, _window) \
2184 })
2185
2189#define BT_LE_SCAN_ACTIVE BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2190 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2191 BT_GAP_SCAN_FAST_INTERVAL, \
2192 BT_GAP_SCAN_FAST_WINDOW)
2193
2199#define BT_LE_SCAN_ACTIVE_CONTINUOUS BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2200 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2201 BT_GAP_SCAN_FAST_INTERVAL_MIN, \
2202 BT_GAP_SCAN_FAST_WINDOW)
2204 "Continuous scanning is requested by setting window and interval equal.");
2205
2212#define BT_LE_SCAN_PASSIVE BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2213 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2214 BT_GAP_SCAN_FAST_INTERVAL, \
2215 BT_GAP_SCAN_FAST_WINDOW)
2216
2223#define BT_LE_SCAN_PASSIVE_CONTINUOUS BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2224 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2225 BT_GAP_SCAN_FAST_INTERVAL_MIN, \
2226 BT_GAP_SCAN_FAST_WINDOW)
2228 "Continuous scanning is requested by setting window and interval equal.");
2229
2234#define BT_LE_SCAN_CODED_ACTIVE \
2235 BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2236 BT_LE_SCAN_OPT_CODED | \
2237 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2238 BT_GAP_SCAN_FAST_INTERVAL, \
2239 BT_GAP_SCAN_FAST_WINDOW)
2240
2248#define BT_LE_SCAN_CODED_PASSIVE \
2249 BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2250 BT_LE_SCAN_OPT_CODED | \
2251 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2252 BT_GAP_SCAN_FAST_INTERVAL, \
2253 BT_GAP_SCAN_FAST_WINDOW)
2254
2276
2286
2299
2308
2324__deprecated
2325static inline int bt_le_whitelist_add(const bt_addr_le_t *addr)
2326{
2327 return bt_le_filter_accept_list_add(addr);
2328}
2329
2345__deprecated
2346static inline int bt_le_whitelist_rem(const bt_addr_le_t *addr)
2347{
2349}
2350
2364__deprecated
2365static inline int bt_le_whitelist_clear(void)
2366{
2368}
2369
2379
2398int bt_le_set_rpa_timeout(uint16_t new_rpa_timeout);
2399
2418 bool (*func)(struct bt_data *data, void *user_data),
2419 void *user_data);
2420
2425
2428};
2429
2436
2439};
2440
2470
2495int bt_le_ext_adv_oob_get_local(struct bt_le_ext_adv *adv,
2496 struct bt_le_oob *oob);
2497
2501 uint8_t _priv[4];
2502
2505
2508
2511
2514};
2515
2529 size_t count);
2530
2537
2540};
2541
2560 struct bt_br_discovery_result *results, size_t count,
2562
2573
2577};
2578
2588
2589
2602int bt_br_set_discoverable(bool enable);
2603
2616int bt_br_set_connectable(bool enable);
2617
2627int bt_unpair(uint8_t id, const bt_addr_le_t *addr);
2628
2633};
2634
2642void bt_foreach_bond(uint8_t id, void (*func)(const struct bt_bond_info *info,
2643 void *user_data),
2644 void *user_data);
2645
2661 const uint8_t *vs_config);
2662
2670
2673
2680};
2681
2692int bt_le_per_adv_sync_subevent(struct bt_le_per_adv_sync *per_adv_sync,
2693 struct bt_le_per_adv_sync_subevent_params *params);
2694
2705
2712
2715
2718};
2719
2732int bt_le_per_adv_set_response_data(struct bt_le_per_adv_sync *per_adv_sync,
2733 const struct bt_le_per_adv_response_params *params,
2734 const struct net_buf_simple *data);
2735
2740#ifdef __cplusplus
2741}
2742#endif
2747#endif /* ZEPHYR_INCLUDE_BLUETOOTH_BLUETOOTH_H_ */
Bluetooth device address definitions and utilities.
Bluetooth subsystem crypto APIs.
Bluetooth Generic Access Profile defines and Assigned Numbers.
#define BT_GAP_SCAN_FAST_WINDOW
Definition: gap.h:713
#define BT_GAP_SCAN_FAST_INTERVAL_MIN
Definition: gap.h:711
int bt_le_filter_accept_list_remove(const bt_addr_le_t *addr)
Remove device (LE) from filter accept list.
int bt_le_per_adv_sync_create(const struct bt_le_per_adv_sync_param *param, struct bt_le_per_adv_sync **out_sync)
Create a periodic advertising sync object.
void bt_id_get(bt_addr_le_t *addrs, size_t *count)
Get the currently configured identities.
int bt_le_per_adv_sync_recv_enable(struct bt_le_per_adv_sync *per_adv_sync)
Enables receiving periodic advertising reports for a sync.
int bt_le_per_adv_sync_transfer_unsubscribe(const struct bt_conn *conn)
Unsubscribe from periodic advertising sync transfers (PASTs).
int bt_disable(void)
Disable Bluetooth.
void bt_le_per_adv_sync_cb_register(struct bt_le_per_adv_sync_cb *cb)
Register periodic advertising sync callbacks.
int bt_le_per_adv_start(struct bt_le_ext_adv *adv)
Starts periodic advertising.
static int bt_le_whitelist_rem(const bt_addr_le_t *addr)
Definition: bluetooth.h:2346
int bt_le_per_adv_list_remove(const bt_addr_le_t *addr, uint8_t sid)
Remove a device from the periodic advertising list.
static int bt_le_whitelist_add(const bt_addr_le_t *addr)
Definition: bluetooth.h:2325
int bt_le_adv_stop(void)
Stop advertising.
int bt_le_ext_adv_update_param(struct bt_le_ext_adv *adv, const struct bt_le_adv_param *param)
Update advertising parameters.
int bt_le_per_adv_stop(struct bt_le_ext_adv *adv)
Stops periodic advertising.
int bt_le_ext_adv_stop(struct bt_le_ext_adv *adv)
Stop advertising with the given advertising set.
static int bt_le_whitelist_clear(void)
Definition: bluetooth.h:2365
int bt_le_per_adv_list_add(const bt_addr_le_t *addr, uint8_t sid)
Add a device to the periodic advertising list.
int bt_le_oob_get_local(uint8_t id, struct bt_le_oob *oob)
Get local LE Out of Band (OOB) information.
int bt_br_oob_get_local(struct bt_br_oob *oob)
Get BR/EDR local Out Of Band information.
uint16_t bt_get_appearance(void)
Get local Bluetooth appearance.
size_t bt_data_serialize(const struct bt_data *input, uint8_t *output)
Serialize a bt_data struct into an advertising structure (a flat byte array).
size_t bt_data_get_len(const struct bt_data data[], size_t data_count)
Get the total size (in bytes) of a given set of bt_data structures.
int bt_le_per_adv_sync_recv_disable(struct bt_le_per_adv_sync *per_adv_sync)
Disables receiving periodic advertising reports for a sync.
int bt_le_filter_accept_list_add(const bt_addr_le_t *addr)
Add device (LE) to filter accept list.
void bt_br_discovery_cb_t(struct bt_br_discovery_result *results, size_t count)
Callback type for reporting BR/EDR discovery (inquiry) results.
Definition: bluetooth.h:2528
int bt_br_discovery_stop(void)
Stop BR/EDR discovery.
int bt_le_per_adv_list_clear(void)
Clear the periodic advertising list.
struct bt_le_per_adv_sync * bt_le_per_adv_sync_lookup_index(uint8_t index)
Get a periodic advertising sync object from the array index.
int bt_le_ext_adv_delete(struct bt_le_ext_adv *adv)
Delete advertising set.
void bt_data_parse(struct net_buf_simple *ad, bool(*func)(struct bt_data *data, void *user_data), void *user_data)
Helper for parsing advertising (or EIR or OOB) data.
void(* bt_ready_cb_t)(int err)
Callback for notifying that Bluetooth has been enabled.
Definition: bluetooth.h:206
int bt_le_per_adv_sync_subevent(struct bt_le_per_adv_sync *per_adv_sync, struct bt_le_per_adv_sync_subevent_params *params)
Synchronize with a subset of subevents.
int bt_le_ext_adv_oob_get_local(struct bt_le_ext_adv *adv, struct bt_le_oob *oob)
Get local LE Out of Band (OOB) information.
int bt_le_per_adv_set_subevent_data(const struct bt_le_ext_adv *adv, uint8_t num_subevents, const struct bt_le_per_adv_subevent_data_params *params)
Set the periodic advertising with response subevent data.
int bt_configure_data_path(uint8_t dir, uint8_t id, uint8_t vs_config_len, const uint8_t *vs_config)
Configure vendor data path.
int bt_br_set_connectable(bool enable)
Enable/disable set controller in connectable state.
struct bt_le_per_adv_sync * bt_le_per_adv_sync_lookup_addr(const bt_addr_le_t *adv_addr, uint8_t sid)
Look up an existing periodic advertising sync object by advertiser address.
uint8_t bt_le_per_adv_sync_get_index(struct bt_le_per_adv_sync *per_adv_sync)
Get array index of an periodic advertising sync object.
int bt_le_adv_update_data(const struct bt_data *ad, size_t ad_len, const struct bt_data *sd, size_t sd_len)
Update advertising.
int bt_le_set_rpa_timeout(uint16_t new_rpa_timeout)
Set the Resolvable Private Address timeout in runtime.
void bt_le_scan_cb_t(const bt_addr_le_t *addr, int8_t rssi, uint8_t adv_type, struct net_buf_simple *buf)
Callback type for reporting LE scan results.
Definition: bluetooth.h:1359
int bt_le_per_adv_sync_transfer_subscribe(const struct bt_conn *conn, const struct bt_le_per_adv_sync_transfer_param *param)
Subscribe to periodic advertising sync transfers (PASTs).
int bt_le_per_adv_sync_delete(struct bt_le_per_adv_sync *per_adv_sync)
Delete periodic advertising sync.
int bt_le_scan_stop(void)
Stop (LE) scanning.
int bt_le_per_adv_set_param(struct bt_le_ext_adv *adv, const struct bt_le_per_adv_param *param)
Set or update the periodic advertising parameters.
bool bt_is_ready(void)
Check if Bluetooth is ready.
void bt_foreach_bond(uint8_t id, void(*func)(const struct bt_bond_info *info, void *user_data), void *user_data)
Iterate through all existing bonds.
int bt_le_per_adv_set_response_data(struct bt_le_per_adv_sync *per_adv_sync, const struct bt_le_per_adv_response_params *params, const struct net_buf_simple *data)
Set the data for a response slot in a specific subevent of the PAwR.
int bt_id_reset(uint8_t id, bt_addr_le_t *addr, uint8_t *irk)
Reset/reclaim an identity for reuse.
int bt_le_set_chan_map(uint8_t chan_map[5])
Set (LE) channel map.
int bt_le_per_adv_sync_get_info(struct bt_le_per_adv_sync *per_adv_sync, struct bt_le_per_adv_sync_info *info)
Get periodic adv sync information.
int bt_le_ext_adv_get_info(const struct bt_le_ext_adv *adv, struct bt_le_ext_adv_info *info)
Get advertising set info.
void bt_le_scan_cb_unregister(struct bt_le_scan_cb *cb)
Unregister scanner packet callbacks.
int bt_enable(bt_ready_cb_t cb)
Enable Bluetooth.
int bt_le_scan_start(const struct bt_le_scan_param *param, bt_le_scan_cb_t cb)
Start (LE) scanning.
int bt_le_filter_accept_list_clear(void)
Clear filter accept list.
int bt_set_name(const char *name)
Set Bluetooth Device Name.
int bt_le_per_adv_set_info_transfer(const struct bt_le_ext_adv *adv, const struct bt_conn *conn, uint16_t service_data)
Transfer the information about a periodic advertising set.
int bt_unpair(uint8_t id, const bt_addr_le_t *addr)
Clear pairing information.
int bt_le_ext_adv_create(const struct bt_le_adv_param *param, const struct bt_le_ext_adv_cb *cb, struct bt_le_ext_adv **adv)
Create advertising set.
int bt_le_adv_start(const struct bt_le_adv_param *param, const struct bt_data *ad, size_t ad_len, const struct bt_data *sd, size_t sd_len)
Start advertising.
int bt_br_set_discoverable(bool enable)
Enable/disable set controller in discoverable state.
int bt_le_ext_adv_set_data(struct bt_le_ext_adv *adv, const struct bt_data *ad, size_t ad_len, const struct bt_data *sd, size_t sd_len)
Set an advertising set's advertising or scan response data.
void bt_le_scan_cb_register(struct bt_le_scan_cb *cb)
Register scanner packet callbacks.
const char * bt_get_name(void)
Get Bluetooth Device Name.
int bt_le_ext_adv_start(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_start_param *param)
Start advertising with the given advertising set.
int bt_id_create(bt_addr_le_t *addr, uint8_t *irk)
Create a new identity.
uint8_t bt_le_ext_adv_get_index(struct bt_le_ext_adv *adv)
Get array index of an advertising set.
int bt_set_appearance(uint16_t new_appearance)
Set local Bluetooth appearance.
int bt_id_delete(uint8_t id)
Delete an identity.
int bt_br_discovery_start(const struct bt_br_discovery_param *param, struct bt_br_discovery_result *results, size_t count, bt_br_discovery_cb_t cb)
Start BR/EDR discovery.
int bt_le_per_adv_sync_transfer(const struct bt_le_per_adv_sync *per_adv_sync, const struct bt_conn *conn, uint16_t service_data)
Transfer the periodic advertising sync information to a peer device.
int bt_le_per_adv_set_data(const struct bt_le_ext_adv *adv, const struct bt_data *ad, size_t ad_len)
Set or update the periodic advertising data.
@ BT_LE_ADV_OPT_FORCE_NAME_IN_AD
Put GAP device name into advert data.
Definition: bluetooth.h:708
@ BT_LE_ADV_OPT_NOTIFY_SCAN_REQ
Notify the application when a scan response data has been sent to an active scanner.
Definition: bluetooth.h:611
@ BT_LE_ADV_OPT_ANONYMOUS
Advertise without a device address (identity or RPA).
Definition: bluetooth.h:679
@ BT_LE_ADV_OPT_USE_NRPA
Advertise using a Non-Resolvable Private Address.
Definition: bluetooth.h:722
@ BT_LE_ADV_OPT_CONNECTABLE
Advertise as connectable.
Definition: bluetooth.h:522
@ BT_LE_ADV_OPT_USE_NAME
Advertise using GAP device name.
Definition: bluetooth.h:576
@ BT_LE_ADV_OPT_USE_IDENTITY
Advertise using identity address.
Definition: bluetooth.h:550
@ BT_LE_ADV_OPT_ONE_TIME
Advertise one time.
Definition: bluetooth.h:538
@ BT_LE_ADV_OPT_FILTER_SCAN_REQ
Use filter accept list to filter devices that can request scan response data.
Definition: bluetooth.h:603
@ BT_LE_ADV_OPT_DISABLE_CHAN_39
Disable advertising on channel index 39.
Definition: bluetooth.h:695
@ BT_LE_ADV_OPT_NONE
Convenience value when no options are specified.
Definition: bluetooth.h:512
@ BT_LE_ADV_OPT_DISABLE_CHAN_37
Disable advertising on channel index 37.
Definition: bluetooth.h:689
@ BT_LE_ADV_OPT_DISABLE_CHAN_38
Disable advertising on channel index 38.
Definition: bluetooth.h:692
@ BT_LE_ADV_OPT_DIR_ADDR_RPA
Directed advertising to privacy-enabled peer.
Definition: bluetooth.h:598
@ BT_LE_ADV_OPT_CODED
Advertise on the LE Coded PHY (Long Range).
Definition: bluetooth.h:672
@ BT_LE_ADV_OPT_FILTER_CONN
Use filter accept list to filter devices that can connect.
Definition: bluetooth.h:606
@ BT_LE_ADV_OPT_EXT_ADV
Advertise with extended advertising.
Definition: bluetooth.h:644
@ BT_LE_ADV_OPT_SCANNABLE
Support scan response data.
Definition: bluetooth.h:622
@ BT_LE_ADV_OPT_NO_2M
Disable use of LE 2M PHY on the secondary advertising channel.
Definition: bluetooth.h:660
@ BT_LE_ADV_OPT_USE_TX_POWER
Advertise with transmit power.
Definition: bluetooth.h:686
@ BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY
Low duty cycle directed advertising.
Definition: bluetooth.h:584
@ BT_LE_PER_ADV_OPT_INCLUDE_ADI
Advertise with included AdvDataInfo (ADI).
Definition: bluetooth.h:811
@ BT_LE_PER_ADV_OPT_USE_TX_POWER
Advertise with transmit power.
Definition: bluetooth.h:804
@ BT_LE_PER_ADV_OPT_NONE
Convenience value when no options are specified.
Definition: bluetooth.h:797
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_2US
Sync with Angle of Departure (AoD) 2 us constant tone extension.
Definition: bluetooth.h:1655
@ BT_LE_PER_ADV_SYNC_OPT_SYNC_ONLY_CONST_TONE_EXT
Do not sync to packets without a constant tone extension.
Definition: bluetooth.h:1658
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_1US
Sync with Angle of Departure (AoD) 1 us constant tone extension.
Definition: bluetooth.h:1652
@ BT_LE_PER_ADV_SYNC_OPT_FILTER_DUPLICATE
Filter duplicate Periodic Advertising reports.
Definition: bluetooth.h:1646
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOA
Sync with Angle of Arrival (AoA) constant tone extension.
Definition: bluetooth.h:1649
@ BT_LE_PER_ADV_SYNC_OPT_REPORTING_INITIALLY_DISABLED
Disables periodic advertising reports.
Definition: bluetooth.h:1643
@ BT_LE_PER_ADV_SYNC_OPT_USE_PER_ADV_LIST
Use the periodic advertising list to sync with advertiser.
Definition: bluetooth.h:1636
@ BT_LE_PER_ADV_SYNC_OPT_NONE
Convenience value when no options are specified.
Definition: bluetooth.h:1628
@ BT_LE_SCAN_OPT_FILTER_DUPLICATE
Filter duplicates.
Definition: bluetooth.h:2012
@ BT_LE_SCAN_OPT_CODED
Enable scan on coded PHY (Long Range).
Definition: bluetooth.h:2018
@ BT_LE_SCAN_OPT_NO_1M
Disable scan on 1M phy.
Definition: bluetooth.h:2025
@ BT_LE_SCAN_OPT_NONE
Convenience value when no options are specified.
Definition: bluetooth.h:2009
@ BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST
Filter using filter accept list.
Definition: bluetooth.h:2015
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOA
No Angle of Arrival (AoA)
Definition: bluetooth.h:1845
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_REPORTING_INITIALLY_DISABLED
Sync to received PAST packets but don't generate sync reports.
Definition: bluetooth.h:1872
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_2US
No Angle of Departure (AoD) 2.
Definition: bluetooth.h:1861
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_1US
No Angle of Departure (AoD) 1 us.
Definition: bluetooth.h:1853
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_FILTER_DUPLICATES
Sync to received PAST packets and generate sync reports with duplicate filtering.
Definition: bluetooth.h:1880
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_ONLY_CTE
Only sync to packets with constant tone extension.
Definition: bluetooth.h:1864
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_NONE
Convenience value when no options are specified.
Definition: bluetooth.h:1838
@ BT_LE_SCAN_TYPE_PASSIVE
Scan without requesting additional information from advertisers.
Definition: bluetooth.h:2032
@ BT_LE_SCAN_TYPE_ACTIVE
Scan and request additional information from advertisers.
Definition: bluetooth.h:2041
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
Buffer management.
#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
Information about a bond with a remote device.
Definition: bluetooth.h:2630
bt_addr_le_t addr
Address of the remote device.
Definition: bluetooth.h:2632
BR/EDR discovery parameters.
Definition: bluetooth.h:2532
uint8_t length
Maximum length of the discovery in units of 1.28 seconds.
Definition: bluetooth.h:2536
bool limited
True if limited discovery procedure is to be used.
Definition: bluetooth.h:2539
BR/EDR discovery result structure.
Definition: bluetooth.h:2499
uint8_t eir[240]
Extended Inquiry Response.
Definition: bluetooth.h:2513
bt_addr_t addr
Remote device address.
Definition: bluetooth.h:2504
int8_t rssi
RSSI from inquiry.
Definition: bluetooth.h:2507
uint8_t cod[3]
Class of Device.
Definition: bluetooth.h:2510
Definition: bluetooth.h:2574
bt_addr_t addr
BR/EDR address.
Definition: bluetooth.h:2576
Bluetooth data.
Definition: bluetooth.h:445
uint8_t type
Definition: bluetooth.h:446
uint8_t data_len
Definition: bluetooth.h:447
const uint8_t * data
Definition: bluetooth.h:448
Definition: direction.h:115
Broadcast Isochronous Group (BIG) information.
Definition: iso.h:563
LE Advertising Parameters.
Definition: bluetooth.h:726
uint32_t options
Bit-field of advertising options.
Definition: bluetooth.h:755
const bt_addr_le_t * peer
Directed advertising to peer.
Definition: bluetooth.h:790
uint8_t sid
Advertising Set Identifier, valid range 0x00 - 0x0f.
Definition: bluetooth.h:742
uint8_t secondary_max_skip
Secondary channel maximum skip count.
Definition: bluetooth.h:752
uint32_t interval_min
Minimum Advertising Interval (N * 0.625 milliseconds) Minimum Advertising Interval shall be less than...
Definition: bluetooth.h:764
uint8_t id
Local identity.
Definition: bluetooth.h:735
uint32_t interval_max
Maximum Advertising Interval (N * 0.625 milliseconds) Minimum Advertising Interval shall be less than...
Definition: bluetooth.h:773
Definition: bluetooth.h:113
void(* scanned)(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_scanned_info *info)
The advertising set has sent scan response data.
Definition: bluetooth.h:150
void(* connected)(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_connected_info *info)
The advertising set has accepted a new connection.
Definition: bluetooth.h:137
void(* sent)(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_sent_info *info)
The advertising set has finished sending adv data.
Definition: bluetooth.h:125
Definition: bluetooth.h:70
struct bt_conn * conn
Connection object of the new connection.
Definition: bluetooth.h:72
Advertising set info structure.
Definition: bluetooth.h:1324
uint8_t id
Definition: bluetooth.h:1326
const bt_addr_le_t * addr
Current local advertising address used.
Definition: bluetooth.h:1332
int8_t tx_power
Currently selected Transmit Power (dBM).
Definition: bluetooth.h:1329
Definition: bluetooth.h:75
bt_addr_le_t * addr
Active scanner LE address and type.
Definition: bluetooth.h:77
Definition: bluetooth.h:65
uint8_t num_sent
The number of advertising events completed.
Definition: bluetooth.h:67
Definition: bluetooth.h:1191
uint16_t timeout
Advertiser timeout (N * 10 ms).
Definition: bluetooth.h:1205
uint8_t num_events
Number of advertising events.
Definition: bluetooth.h:1212
LE Secure Connections pairing Out of Band data.
Definition: bluetooth.h:2422
uint8_t c[16]
Confirm Value.
Definition: bluetooth.h:2427
uint8_t r[16]
Random Number.
Definition: bluetooth.h:2424
LE Out of Band information.
Definition: bluetooth.h:2431
bt_addr_le_t addr
LE address.
Definition: bluetooth.h:2435
struct bt_le_oob_sc_data le_sc_data
LE Secure Connections pairing Out of Band data.
Definition: bluetooth.h:2438
Definition: bluetooth.h:80
uint8_t count
The number of subevents data can be set for.
Definition: bluetooth.h:85
uint8_t start
The first subevent data can be set for.
Definition: bluetooth.h:82
Definition: bluetooth.h:814
uint16_t interval_min
Minimum Periodic Advertising Interval (N * 1.25 ms)
Definition: bluetooth.h:821
uint16_t interval_max
Maximum Periodic Advertising Interval (N * 1.25 ms)
Definition: bluetooth.h:829
uint32_t options
Bit-field of periodic advertising options.
Definition: bluetooth.h:832
Definition: bluetooth.h:88
uint8_t subevent
The subevent the response was received in.
Definition: bluetooth.h:90
int8_t rssi
The RSSI of the response in dBm.
Definition: bluetooth.h:104
uint8_t cte_type
The Constant Tone Extension (CTE) of the advertisement (bt_df_cte_type)
Definition: bluetooth.h:107
int8_t tx_power
The TX power of the response in dBm.
Definition: bluetooth.h:101
uint8_t response_slot
The slot the response was received in.
Definition: bluetooth.h:110
uint8_t tx_status
Status of the subevent indication.
Definition: bluetooth.h:98
Definition: bluetooth.h:2695
uint8_t response_subevent
The subevent the response shall be sent in.
Definition: bluetooth.h:2714
uint16_t request_event
The periodic event counter of the request the response is sent to.
Definition: bluetooth.h:2704
uint8_t request_subevent
The subevent counter of the request the response is sent to.
Definition: bluetooth.h:2711
uint8_t response_slot
The response slot the response shall be sent in.
Definition: bluetooth.h:2717
Definition: bluetooth.h:1393
uint8_t response_slot_start
The first response slot to listen to.
Definition: bluetooth.h:1398
const struct net_buf_simple * data
The data to send.
Definition: bluetooth.h:1404
uint8_t subevent
The subevent to set data for.
Definition: bluetooth.h:1395
uint8_t response_slot_count
The number of response slots to listen to.
Definition: bluetooth.h:1401
Definition: bluetooth.h:1544
sys_snode_t node
Definition: bluetooth.h:1622
void(* recv)(struct bt_le_per_adv_sync *sync, const struct bt_le_per_adv_sync_recv_info *info, struct net_buf_simple *buf)
Periodic advertising data received.
Definition: bluetooth.h:1583
void(* state_changed)(struct bt_le_per_adv_sync *sync, const struct bt_le_per_adv_sync_state_info *info)
The periodic advertising sync state has changed.
Definition: bluetooth.h:1597
void(* synced)(struct bt_le_per_adv_sync *sync, struct bt_le_per_adv_sync_synced_info *info)
The periodic advertising has been successfully synced.
Definition: bluetooth.h:1555
void(* biginfo)(struct bt_le_per_adv_sync *sync, const struct bt_iso_biginfo *biginfo)
BIGInfo advertising report received.
Definition: bluetooth.h:1610
void(* term)(struct bt_le_per_adv_sync *sync, const struct bt_le_per_adv_sync_term_info *info)
The periodic advertising sync has been terminated.
Definition: bluetooth.h:1567
void(* cte_report_cb)(struct bt_le_per_adv_sync *sync, struct bt_df_per_adv_sync_iq_samples_report const *info)
Callback for IQ samples report collected when sampling CTE received with periodic advertising PDU.
Definition: bluetooth.h:1619
Advertising set info structure.
Definition: bluetooth.h:1727
uint16_t interval
Periodic advertising interval (N * 1.25 ms)
Definition: bluetooth.h:1735
uint8_t phy
Advertiser PHY.
Definition: bluetooth.h:1738
bt_addr_le_t addr
Periodic Advertiser Address.
Definition: bluetooth.h:1729
uint8_t sid
Advertiser SID.
Definition: bluetooth.h:1732
Definition: bluetooth.h:1661
uint16_t timeout
Synchronization timeout (N * 10 ms)
Definition: bluetooth.h:1696
uint32_t options
Bit-field of periodic advertising sync options.
Definition: bluetooth.h:1679
uint8_t sid
Advertiser SID.
Definition: bluetooth.h:1676
bt_addr_le_t addr
Periodic Advertiser Address.
Definition: bluetooth.h:1668
uint16_t skip
Maximum event skip.
Definition: bluetooth.h:1688
Definition: bluetooth.h:1514
uint8_t cte_type
The Constant Tone Extension (CTE) of the advertisement (bt_df_cte_type)
Definition: bluetooth.h:1528
uint8_t sid
Advertiser SID.
Definition: bluetooth.h:1519
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition: bluetooth.h:1516
int8_t tx_power
The TX power of the advertisement.
Definition: bluetooth.h:1522
int8_t rssi
The RSSI of the advertisement excluding any CTE.
Definition: bluetooth.h:1525
Definition: bluetooth.h:1539
bool recv_enabled
True if receiving periodic advertisements, false otherwise.
Definition: bluetooth.h:1541
Definition: bluetooth.h:2663
uint8_t * subevents
The subevent(s) to synchronize with.
Definition: bluetooth.h:2679
uint16_t properties
Periodic Advertising Properties.
Definition: bluetooth.h:2669
uint8_t num_subevents
Number of subevents to sync to.
Definition: bluetooth.h:2672
Definition: bluetooth.h:1457
bool recv_enabled
True if receiving periodic advertisements, false otherwise.
Definition: bluetooth.h:1471
uint16_t interval
Periodic advertising interval (N * 1.25 ms)
Definition: bluetooth.h:1465
uint8_t sid
Advertiser SID.
Definition: bluetooth.h:1462
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition: bluetooth.h:1459
uint8_t phy
Advertiser PHY.
Definition: bluetooth.h:1468
struct bt_conn * conn
Peer that transferred the periodic advertising sync.
Definition: bluetooth.h:1486
uint16_t service_data
Service Data provided by the peer when sync is transferred.
Definition: bluetooth.h:1478
Definition: bluetooth.h:1503
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition: bluetooth.h:1505
uint8_t reason
Cause of periodic advertising termination.
Definition: bluetooth.h:1511
uint8_t sid
Advertiser SID.
Definition: bluetooth.h:1508
Definition: bluetooth.h:1883
uint32_t options
Periodic Advertising Sync Transfer options.
Definition: bluetooth.h:1901
uint16_t timeout
Synchronization timeout (N * 10 ms)
Definition: bluetooth.h:1898
uint16_t skip
Maximum event skip.
Definition: bluetooth.h:1890
Listener context for (LE) scanning.
Definition: bluetooth.h:2135
void(* timeout)(void)
The scanner has stopped scanning after scan timeout.
Definition: bluetooth.h:2147
sys_snode_t node
Definition: bluetooth.h:2149
void(* recv)(const struct bt_le_scan_recv_info *info, struct net_buf_simple *buf)
Advertisement packet and scan response received callback.
Definition: bluetooth.h:2143
LE scan parameters.
Definition: bluetooth.h:2045
uint8_t type
Scan type (BT_LE_SCAN_TYPE_ACTIVE or BT_LE_SCAN_TYPE_PASSIVE)
Definition: bluetooth.h:2047
uint16_t interval
Scan interval (N * 0.625 ms)
Definition: bluetooth.h:2053
uint16_t window
Scan window (N * 0.625 ms)
Definition: bluetooth.h:2056
uint16_t timeout
Scan timeout (N * 10 ms)
Definition: bluetooth.h:2064
uint16_t interval_coded
Scan interval LE Coded PHY (N * 0.625 MS)
Definition: bluetooth.h:2071
uint16_t window_coded
Scan window LE Coded PHY (N * 0.625 MS)
Definition: bluetooth.h:2078
uint32_t options
Bit-field of scanning options.
Definition: bluetooth.h:2050
LE advertisement and scan response packet information.
Definition: bluetooth.h:2082
uint16_t interval
Periodic advertising interval (N * 1.25 ms).
Definition: bluetooth.h:2125
int8_t tx_power
Transmit power of the advertiser.
Definition: bluetooth.h:2098
uint8_t sid
Advertising Set Identifier.
Definition: bluetooth.h:2092
uint8_t primary_phy
Primary advertising channel PHY.
Definition: bluetooth.h:2128
int8_t rssi
Strength of advertiser signal.
Definition: bluetooth.h:2095
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition: bluetooth.h:2089
uint8_t secondary_phy
Secondary advertising channel PHY.
Definition: bluetooth.h:2131
uint8_t adv_type
Advertising packet type.
Definition: bluetooth.h:2108
uint16_t adv_props
Advertising packet properties bitfield.
Definition: bluetooth.h:2118
Simple network buffer representation.
Definition: buf.h:87
uint8_t * data
Pointer to the start of data in the buffer.
Definition: buf.h:89
Misc utilities.