Zephyr Project API 4.0.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>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
49#define BT_ID_DEFAULT 0
50
52struct bt_le_ext_adv;
53
55struct bt_le_per_adv_sync;
56
57/* Don't require everyone to include conn.h */
58struct bt_conn;
59
60/* Don't require everyone to include iso.h */
61struct bt_iso_biginfo;
62
63/* Don't require everyone to include direction.h */
65
70
73 struct bt_conn *conn;
74};
75
80
88
113
126 void (*sent)(struct bt_le_ext_adv *adv,
127 struct bt_le_ext_adv_sent_info *info);
128
138 void (*connected)(struct bt_le_ext_adv *adv,
139 struct bt_le_ext_adv_connected_info *info);
140
151 void (*scanned)(struct bt_le_ext_adv *adv,
152 struct bt_le_ext_adv_scanned_info *info);
153
154#if defined(CONFIG_BT_PRIVACY)
171 bool (*rpa_expired)(struct bt_le_ext_adv *adv);
172#endif /* defined(CONFIG_BT_PRIVACY) */
173
174#if defined(CONFIG_BT_PER_ADV_RSP)
184 void (*pawr_data_request)(struct bt_le_ext_adv *adv,
185 const struct bt_le_per_adv_data_request *request);
195 void (*pawr_response)(struct bt_le_ext_adv *adv, struct bt_le_per_adv_response_info *info,
196 struct net_buf_simple *buf);
197
198#endif /* defined(CONFIG_BT_PER_ADV_RSP) */
199};
200
207typedef void (*bt_ready_cb_t)(int err);
208
229
249int bt_disable(void);
250
256bool bt_is_ready(void);
257
275int bt_set_name(const char *name);
276
284const char *bt_get_name(void);
285
297
312int bt_set_appearance(uint16_t new_appearance);
313
334void bt_id_get(bt_addr_le_t *addrs, size_t *count);
335
383
417
435
447#define BT_DATA_SERIALIZED_SIZE(data_len) ((data_len) + 2)
448
461
472#define BT_DATA(_type, _data, _data_len) \
473 { \
474 .type = (_type), \
475 .data_len = (_data_len), \
476 .data = (const uint8_t *)(_data), \
477 }
478
488#define BT_DATA_BYTES(_type, _bytes...) \
489 BT_DATA(_type, ((uint8_t []) { _bytes }), \
490 sizeof((uint8_t []) { _bytes }))
491
502size_t bt_data_get_len(const struct bt_data data[], size_t data_count);
503
518size_t bt_data_serialize(const struct bt_data *input, uint8_t *output);
519
521enum {
524
546
557 _BT_LE_ADV_OPT_CONNECTABLE = BIT(0),
558
575 BT_LE_ADV_OPT_ONE_TIME __deprecated = BIT(1),
576
583 _BT_LE_ADV_OPT_ONE_TIME = BIT(1),
584
604
616
642
650
664
669
672
677
687
709
725
737
744
751
754
757
760
773
787
804
821};
822
890
891
893enum {
896
903
910};
911
920
928
931
932#if defined(CONFIG_BT_PER_ADV_RSP)
938 uint8_t num_subevents;
939
945 uint8_t subevent_interval;
946
952 uint8_t response_slot_delay;
953
959 uint8_t response_slot_spacing;
960
966 uint8_t num_response_slots;
967#endif /* CONFIG_BT_PER_ADV_RSP */
968};
969
979#define BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
980{ \
981 .id = BT_ID_DEFAULT, \
982 .sid = 0, \
983 .secondary_max_skip = 0, \
984 .options = (_options), \
985 .interval_min = (_int_min), \
986 .interval_max = (_int_max), \
987 .peer = (_peer), \
988}
989
999#define BT_LE_ADV_PARAM(_options, _int_min, _int_max, _peer) \
1000 ((const struct bt_le_adv_param[]) { \
1001 BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
1002 })
1003
1004#define BT_LE_ADV_CONN_DIR(_peer) BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, 0, 0, _peer)
1005
1012#define BT_LE_ADV_CONN \
1013 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, BT_GAP_ADV_FAST_INT_MIN_2, \
1014 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1015 __DEPRECATED_MACRO
1016
1038#define BT_LE_ADV_CONN_FAST_1 \
1039 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_1, BT_GAP_ADV_FAST_INT_MAX_1, \
1040 NULL)
1041
1054#define BT_LE_ADV_CONN_FAST_2 \
1055 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, \
1056 NULL)
1057
1058#define BT_LE_ADV_CONN_ONE_TIME BT_LE_ADV_CONN_FAST_2 __DEPRECATED_MACRO
1059
1064#define BT_LE_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
1065 BT_LE_ADV_OPT_USE_NAME, \
1066 BT_GAP_ADV_FAST_INT_MIN_2, \
1067 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1068 __DEPRECATED_MACRO
1069
1074#define BT_LE_ADV_CONN_NAME_AD BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
1075 BT_LE_ADV_OPT_USE_NAME | \
1076 BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \
1077 BT_GAP_ADV_FAST_INT_MIN_2, \
1078 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1079 __DEPRECATED_MACRO
1080
1081#define BT_LE_ADV_CONN_DIR_LOW_DUTY(_peer) \
1082 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY, \
1083 BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, _peer)
1084
1086#define BT_LE_ADV_NCONN BT_LE_ADV_PARAM(0, BT_GAP_ADV_FAST_INT_MIN_2, \
1087 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1088
1095#define BT_LE_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_NAME, \
1096 BT_GAP_ADV_FAST_INT_MIN_2, \
1097 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1098 __DEPRECATED_MACRO
1099
1101#define BT_LE_ADV_NCONN_IDENTITY BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, \
1102 BT_GAP_ADV_FAST_INT_MIN_2, \
1103 BT_GAP_ADV_FAST_INT_MAX_2, \
1104 NULL)
1105
1107#define BT_LE_EXT_ADV_CONN \
1108 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, \
1109 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1110
1117#define BT_LE_EXT_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1118 BT_LE_ADV_OPT_CONNECTABLE | \
1119 BT_LE_ADV_OPT_USE_NAME, \
1120 BT_GAP_ADV_FAST_INT_MIN_2, \
1121 BT_GAP_ADV_FAST_INT_MAX_2, \
1122 NULL) \
1123 __DEPRECATED_MACRO
1124
1126#define BT_LE_EXT_ADV_SCAN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1127 BT_LE_ADV_OPT_SCANNABLE, \
1128 BT_GAP_ADV_FAST_INT_MIN_2, \
1129 BT_GAP_ADV_FAST_INT_MAX_2, \
1130 NULL)
1131
1138#define BT_LE_EXT_ADV_SCAN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1139 BT_LE_ADV_OPT_SCANNABLE | \
1140 BT_LE_ADV_OPT_USE_NAME, \
1141 BT_GAP_ADV_FAST_INT_MIN_2, \
1142 BT_GAP_ADV_FAST_INT_MAX_2, \
1143 NULL) \
1144 __DEPRECATED_MACRO
1145
1147#define BT_LE_EXT_ADV_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV, \
1148 BT_GAP_ADV_FAST_INT_MIN_2, \
1149 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1150
1157#define BT_LE_EXT_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1158 BT_LE_ADV_OPT_USE_NAME, \
1159 BT_GAP_ADV_FAST_INT_MIN_2, \
1160 BT_GAP_ADV_FAST_INT_MAX_2, \
1161 NULL) \
1162 __DEPRECATED_MACRO
1163
1165#define BT_LE_EXT_ADV_NCONN_IDENTITY \
1166 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1167 BT_LE_ADV_OPT_USE_IDENTITY, \
1168 BT_GAP_ADV_FAST_INT_MIN_2, \
1169 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1170
1172#define BT_LE_EXT_ADV_CODED_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1173 BT_LE_ADV_OPT_CODED, \
1174 BT_GAP_ADV_FAST_INT_MIN_2, \
1175 BT_GAP_ADV_FAST_INT_MAX_2, \
1176 NULL)
1177
1185#define BT_LE_EXT_ADV_CODED_NCONN_NAME \
1186 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1187 BT_LE_ADV_OPT_USE_NAME, \
1188 BT_GAP_ADV_FAST_INT_MIN_2, \
1189 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1190 __DEPRECATED_MACRO
1191
1195#define BT_LE_EXT_ADV_CODED_NCONN_IDENTITY \
1196 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1197 BT_LE_ADV_OPT_USE_IDENTITY, \
1198 BT_GAP_ADV_FAST_INT_MIN_2, \
1199 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1200
1207#define BT_LE_EXT_ADV_START_PARAM_INIT(_timeout, _n_evts) \
1208{ \
1209 .timeout = (_timeout), \
1210 .num_events = (_n_evts), \
1211}
1212
1219#define BT_LE_EXT_ADV_START_PARAM(_timeout, _n_evts) \
1220 ((const struct bt_le_ext_adv_start_param[]) { \
1221 BT_LE_EXT_ADV_START_PARAM_INIT((_timeout), (_n_evts)) \
1222 })
1223
1224#define BT_LE_EXT_ADV_START_DEFAULT BT_LE_EXT_ADV_START_PARAM(0, 0)
1225
1233#define BT_LE_PER_ADV_PARAM_INIT(_int_min, _int_max, _options) \
1234{ \
1235 .interval_min = (_int_min), \
1236 .interval_max = (_int_max), \
1237 .options = (_options), \
1238}
1239
1247#define BT_LE_PER_ADV_PARAM(_int_min, _int_max, _options) \
1248 ((struct bt_le_per_adv_param[]) { \
1249 BT_LE_PER_ADV_PARAM_INIT(_int_min, _int_max, _options) \
1250 })
1251
1252#define BT_LE_PER_ADV_DEFAULT BT_LE_PER_ADV_PARAM(BT_GAP_PER_ADV_SLOW_INT_MIN, \
1253 BT_GAP_PER_ADV_SLOW_INT_MAX, \
1254 BT_LE_PER_ADV_OPT_NONE)
1255
1286int bt_le_adv_start(const struct bt_le_adv_param *param,
1287 const struct bt_data *ad, size_t ad_len,
1288 const struct bt_data *sd, size_t sd_len);
1289
1302int bt_le_adv_update_data(const struct bt_data *ad, size_t ad_len,
1303 const struct bt_data *sd, size_t sd_len);
1304
1313
1329 const struct bt_le_ext_adv_cb *cb,
1330 struct bt_le_ext_adv **adv);
1331
1355
1369int bt_le_ext_adv_start(struct bt_le_ext_adv *adv,
1370 const struct bt_le_ext_adv_start_param *param);
1371
1382int bt_le_ext_adv_stop(struct bt_le_ext_adv *adv);
1383
1418int bt_le_ext_adv_set_data(struct bt_le_ext_adv *adv,
1419 const struct bt_data *ad, size_t ad_len,
1420 const struct bt_data *sd, size_t sd_len);
1421
1438int bt_le_ext_adv_update_param(struct bt_le_ext_adv *adv,
1439 const struct bt_le_adv_param *param);
1440
1449int bt_le_ext_adv_delete(struct bt_le_ext_adv *adv);
1450
1462uint8_t bt_le_ext_adv_get_index(struct bt_le_ext_adv *adv);
1463
1466 /* Local identity */
1468
1471
1474};
1475
1484int bt_le_ext_adv_get_info(const struct bt_le_ext_adv *adv,
1485 struct bt_le_ext_adv_info *info);
1486
1500typedef void bt_le_scan_cb_t(const bt_addr_le_t *addr, int8_t rssi,
1501 uint8_t adv_type, struct net_buf_simple *buf);
1502
1515int bt_le_per_adv_set_param(struct bt_le_ext_adv *adv,
1516 const struct bt_le_per_adv_param *param);
1517
1531int bt_le_per_adv_set_data(const struct bt_le_ext_adv *adv,
1532 const struct bt_data *ad, size_t ad_len);
1533
1547
1563int bt_le_per_adv_set_subevent_data(const struct bt_le_ext_adv *adv, uint8_t num_subevents,
1564 const struct bt_le_per_adv_subevent_data_params *params);
1565
1583int bt_le_per_adv_start(struct bt_le_ext_adv *adv);
1584
1596int bt_le_per_adv_stop(struct bt_le_ext_adv *adv);
1597
1601
1604
1607
1610
1613
1620
1627 struct bt_conn *conn;
1628#if defined(CONFIG_BT_PER_ADV_SYNC_RSP)
1630 uint8_t num_subevents;
1631
1633 uint8_t subevent_interval;
1634
1636 uint8_t response_slot_delay;
1637
1639 uint8_t response_slot_spacing;
1640
1641#endif /* CONFIG_BT_PER_ADV_SYNC_RSP */
1642};
1643
1654
1658
1661
1664
1667
1670#if defined(CONFIG_BT_PER_ADV_SYNC_RSP)
1672 uint16_t periodic_event_counter;
1673
1675 uint8_t subevent;
1676#endif /* CONFIG_BT_PER_ADV_SYNC_RSP */
1677};
1678
1679
1684
1696 void (*synced)(struct bt_le_per_adv_sync *sync,
1697 struct bt_le_per_adv_sync_synced_info *info);
1698
1708 void (*term)(struct bt_le_per_adv_sync *sync,
1709 const struct bt_le_per_adv_sync_term_info *info);
1710
1724 void (*recv)(struct bt_le_per_adv_sync *sync,
1725 const struct bt_le_per_adv_sync_recv_info *info,
1726 struct net_buf_simple *buf);
1727
1738 void (*state_changed)(struct bt_le_per_adv_sync *sync,
1739 const struct bt_le_per_adv_sync_state_info *info);
1740
1751 void (*biginfo)(struct bt_le_per_adv_sync *sync, const struct bt_iso_biginfo *biginfo);
1752
1760 void (*cte_report_cb)(struct bt_le_per_adv_sync *sync,
1761 struct bt_df_per_adv_sync_iq_samples_report const *info);
1762
1764};
1765
1767enum {
1770
1778
1785
1788
1791
1794
1797
1800};
1801
1839
1851uint8_t bt_le_per_adv_sync_get_index(struct bt_le_per_adv_sync *per_adv_sync);
1852
1865struct bt_le_per_adv_sync *bt_le_per_adv_sync_lookup_index(uint8_t index);
1866
1881
1890int bt_le_per_adv_sync_get_info(struct bt_le_per_adv_sync *per_adv_sync,
1891 struct bt_le_per_adv_sync_info *info);
1892
1901struct bt_le_per_adv_sync *bt_le_per_adv_sync_lookup_addr(const bt_addr_le_t *adv_addr,
1902 uint8_t sid);
1903
1921 struct bt_le_per_adv_sync **out_sync);
1922
1939int bt_le_per_adv_sync_delete(struct bt_le_per_adv_sync *per_adv_sync);
1940
1956
1966int bt_le_per_adv_sync_recv_enable(struct bt_le_per_adv_sync *per_adv_sync);
1967
1977int bt_le_per_adv_sync_recv_disable(struct bt_le_per_adv_sync *per_adv_sync);
1978
1980enum {
1983
1990
1998
2006
2009
2017
2025};
2026
2047
2060int bt_le_per_adv_sync_transfer(const struct bt_le_per_adv_sync *per_adv_sync,
2061 const struct bt_conn *conn,
2062 uint16_t service_data);
2063
2064
2077int bt_le_per_adv_set_info_transfer(const struct bt_le_ext_adv *adv,
2078 const struct bt_conn *conn,
2079 uint16_t service_data);
2080
2095 const struct bt_conn *conn,
2096 const struct bt_le_per_adv_sync_transfer_param *param);
2097
2111int bt_le_per_adv_sync_transfer_unsubscribe(const struct bt_conn *conn);
2112
2127
2140
2149
2150
2151enum {
2154
2157
2160
2163
2170};
2171
2172#define BT_LE_SCAN_OPT_FILTER_WHITELIST __DEPRECATED_MACRO BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST
2173
2174enum {
2177
2186};
2187
2238
2291
2294
2301 void (*recv)(const struct bt_le_scan_recv_info *info,
2302 struct net_buf_simple *buf);
2303
2305 void (*timeout)(void);
2306
2308};
2309
2319#define BT_LE_SCAN_PARAM_INIT(_type, _options, _interval, _window) \
2320{ \
2321 .type = (_type), \
2322 .options = (_options), \
2323 .interval = (_interval), \
2324 .window = (_window), \
2325 .timeout = 0, \
2326 .interval_coded = 0, \
2327 .window_coded = 0, \
2328}
2329
2339#define BT_LE_SCAN_PARAM(_type, _options, _interval, _window) \
2340 ((struct bt_le_scan_param[]) { \
2341 BT_LE_SCAN_PARAM_INIT(_type, _options, _interval, _window) \
2342 })
2343
2347#define BT_LE_SCAN_ACTIVE BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2348 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2349 BT_GAP_SCAN_FAST_INTERVAL, \
2350 BT_GAP_SCAN_FAST_WINDOW)
2351
2357#define BT_LE_SCAN_ACTIVE_CONTINUOUS BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2358 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2359 BT_GAP_SCAN_FAST_INTERVAL_MIN, \
2360 BT_GAP_SCAN_FAST_WINDOW)
2362 "Continuous scanning is requested by setting window and interval equal.");
2363
2370#define BT_LE_SCAN_PASSIVE BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2371 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2372 BT_GAP_SCAN_FAST_INTERVAL, \
2373 BT_GAP_SCAN_FAST_WINDOW)
2374
2381#define BT_LE_SCAN_PASSIVE_CONTINUOUS BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2382 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2383 BT_GAP_SCAN_FAST_INTERVAL_MIN, \
2384 BT_GAP_SCAN_FAST_WINDOW)
2386 "Continuous scanning is requested by setting window and interval equal.");
2387
2392#define BT_LE_SCAN_CODED_ACTIVE \
2393 BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2394 BT_LE_SCAN_OPT_CODED | \
2395 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2396 BT_GAP_SCAN_FAST_INTERVAL, \
2397 BT_GAP_SCAN_FAST_WINDOW)
2398
2406#define BT_LE_SCAN_CODED_PASSIVE \
2407 BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2408 BT_LE_SCAN_OPT_CODED | \
2409 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2410 BT_GAP_SCAN_FAST_INTERVAL, \
2411 BT_GAP_SCAN_FAST_WINDOW)
2412
2440
2450
2466
2475
2491
2507
2521
2531
2550int bt_le_set_rpa_timeout(uint16_t new_rpa_timeout);
2551
2570 bool (*func)(struct bt_data *data, void *user_data),
2571 void *user_data);
2572
2577
2580};
2581
2592
2622
2647int bt_le_ext_adv_oob_get_local(struct bt_le_ext_adv *adv,
2648 struct bt_le_oob *oob);
2649
2659int bt_unpair(uint8_t id, const bt_addr_le_t *addr);
2660
2666
2674void bt_foreach_bond(uint8_t id, void (*func)(const struct bt_bond_info *info,
2675 void *user_data),
2676 void *user_data);
2677
2693 const uint8_t *vs_config);
2694
2713
2724int bt_le_per_adv_sync_subevent(struct bt_le_per_adv_sync *per_adv_sync,
2725 struct bt_le_per_adv_sync_subevent_params *params);
2726
2751
2764int bt_le_per_adv_set_response_data(struct bt_le_per_adv_sync *per_adv_sync,
2765 const struct bt_le_per_adv_response_params *params,
2766 const struct net_buf_simple *data);
2767
2772#ifdef __cplusplus
2773}
2774#endif
2779#endif /* ZEPHYR_INCLUDE_BLUETOOTH_BLUETOOTH_H_ */
Bluetooth device address definitions and utilities.
Bluetooth subsystem crypto APIs.
Bluetooth subsystem classic core APIs.
Bluetooth Generic Access Profile defines and Assigned Numbers.
#define BT_GAP_SCAN_FAST_WINDOW
Definition gap.h:719
#define BT_GAP_SCAN_FAST_INTERVAL_MIN
Definition gap.h:717
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.
int bt_le_per_adv_start(struct bt_le_ext_adv *adv)
Starts periodic advertising.
int bt_le_per_adv_list_remove(const bt_addr_le_t *addr, uint8_t sid)
Remove a device from the periodic advertising list.
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.
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.
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.
int 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_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:207
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_le_scan_cb_register(struct bt_le_scan_cb *cb)
Register scanner packet callbacks.
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:1500
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_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.
const char * bt_get_name(void)
Get Bluetooth Device Name.
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_le_ext_adv_start(struct bt_le_ext_adv *adv, const struct bt_le_ext_adv_start_param *param)
Start advertising with the given advertising set.
int bt_id_delete(uint8_t id)
Delete an identity.
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_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOA
No Angle of Arrival (AoA)
Definition bluetooth.h:1989
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_REPORTING_INITIALLY_DISABLED
Sync to received PAST packets but don't generate sync reports.
Definition bluetooth.h:2016
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_2US
No Angle of Departure (AoD) 2.
Definition bluetooth.h:2005
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_1US
No Angle of Departure (AoD) 1 us.
Definition bluetooth.h:1997
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_FILTER_DUPLICATES
Sync to received PAST packets and generate sync reports with duplicate filtering.
Definition bluetooth.h:2024
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_ONLY_CTE
Only sync to packets with constant tone extension.
Definition bluetooth.h:2008
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:1982
@ BT_LE_SCAN_TYPE_PASSIVE
Scan without requesting additional information from advertisers.
Definition bluetooth.h:2176
@ BT_LE_SCAN_TYPE_ACTIVE
Scan and request additional information from advertisers.
Definition bluetooth.h:2185
@ BT_LE_SCAN_OPT_FILTER_DUPLICATE
Filter duplicates.
Definition bluetooth.h:2156
@ BT_LE_SCAN_OPT_CODED
Enable scan on coded PHY (Long Range).
Definition bluetooth.h:2162
@ BT_LE_SCAN_OPT_NO_1M
Disable scan on 1M phy.
Definition bluetooth.h:2169
@ BT_LE_SCAN_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:2153
@ BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST
Filter using filter accept list.
Definition bluetooth.h:2159
@ BT_LE_ADV_OPT_FORCE_NAME_IN_AD
Put GAP device name into advert data.
Definition bluetooth.h:772
@ 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:676
@ BT_LE_ADV_OPT_ANONYMOUS
Advertise without a device address (identity or RPA).
Definition bluetooth.h:743
@ BT_LE_ADV_OPT_USE_NRPA
Advertise using a Non-Resolvable Private Address.
Definition bluetooth.h:786
@ BT_LE_ADV_OPT_CONNECTABLE
Advertise as connectable.
Definition bluetooth.h:545
@ BT_LE_ADV_OPT_USE_NAME
Advertise using GAP device name.
Definition bluetooth.h:641
@ BT_LE_ADV_OPT_USE_IDENTITY
Advertise using identity address.
Definition bluetooth.h:615
@ BT_LE_ADV_OPT_ONE_TIME
Advertise one time.
Definition bluetooth.h:575
@ BT_LE_ADV_OPT_FILTER_SCAN_REQ
Use filter accept list to filter devices that can request scan response data.
Definition bluetooth.h:668
@ BT_LE_ADV_OPT_DISABLE_CHAN_39
Disable advertising on channel index 39.
Definition bluetooth.h:759
@ BT_LE_ADV_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:523
@ BT_LE_ADV_OPT_REQUIRE_S2_CODING
Configures the advertiser to use the S=2 coding scheme for LE Coded PHY.
Definition bluetooth.h:803
@ BT_LE_ADV_OPT_CONN
Connectable advertising.
Definition bluetooth.h:603
@ BT_LE_ADV_OPT_REQUIRE_S8_CODING
Configures the advertiser to use the S=8 coding scheme for LE Coded PHY.
Definition bluetooth.h:820
@ BT_LE_ADV_OPT_DISABLE_CHAN_37
Disable advertising on channel index 37.
Definition bluetooth.h:753
@ BT_LE_ADV_OPT_DISABLE_CHAN_38
Disable advertising on channel index 38.
Definition bluetooth.h:756
@ BT_LE_ADV_OPT_DIR_ADDR_RPA
Directed advertising to privacy-enabled peer.
Definition bluetooth.h:663
@ BT_LE_ADV_OPT_CODED
Advertise on the LE Coded PHY (Long Range).
Definition bluetooth.h:736
@ BT_LE_ADV_OPT_FILTER_CONN
Use filter accept list to filter devices that can connect.
Definition bluetooth.h:671
@ BT_LE_ADV_OPT_EXT_ADV
Advertise with extended advertising.
Definition bluetooth.h:708
@ BT_LE_ADV_OPT_SCANNABLE
Support scan response data.
Definition bluetooth.h:686
@ BT_LE_ADV_OPT_NO_2M
Disable use of LE 2M PHY on the secondary advertising channel.
Definition bluetooth.h:724
@ BT_LE_ADV_OPT_USE_TX_POWER
Advertise with transmit power.
Definition bluetooth.h:750
@ BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY
Low duty cycle directed advertising.
Definition bluetooth.h:649
@ BT_LE_PER_ADV_OPT_INCLUDE_ADI
Advertise with included AdvDataInfo (ADI).
Definition bluetooth.h:909
@ BT_LE_PER_ADV_OPT_USE_TX_POWER
Advertise with transmit power.
Definition bluetooth.h:902
@ BT_LE_PER_ADV_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:895
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_2US
Sync with Angle of Departure (AoD) 2 us constant tone extension.
Definition bluetooth.h:1796
@ BT_LE_PER_ADV_SYNC_OPT_SYNC_ONLY_CONST_TONE_EXT
Do not sync to packets without a constant tone extension.
Definition bluetooth.h:1799
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_1US
Sync with Angle of Departure (AoD) 1 us constant tone extension.
Definition bluetooth.h:1793
@ BT_LE_PER_ADV_SYNC_OPT_FILTER_DUPLICATE
Filter duplicate Periodic Advertising reports.
Definition bluetooth.h:1787
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOA
Sync with Angle of Arrival (AoA) constant tone extension.
Definition bluetooth.h:1790
@ BT_LE_PER_ADV_SYNC_OPT_REPORTING_INITIALLY_DISABLED
Disables periodic advertising reports.
Definition bluetooth.h:1784
@ BT_LE_PER_ADV_SYNC_OPT_USE_PER_ADV_LIST
Use the periodic advertising list to sync with advertiser.
Definition bluetooth.h:1777
@ BT_LE_PER_ADV_SYNC_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:1769
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
Information about a bond with a remote device.
Definition bluetooth.h:2662
bt_addr_le_t addr
Address of the remote device.
Definition bluetooth.h:2664
Bluetooth data.
Definition bluetooth.h:456
uint8_t type
Definition bluetooth.h:457
uint8_t data_len
Definition bluetooth.h:458
const uint8_t * data
Definition bluetooth.h:459
Definition direction.h:115
Broadcast Isochronous Group (BIG) information.
Definition iso.h:628
LE Advertising Parameters.
Definition bluetooth.h:824
uint32_t options
Bit-field of advertising options.
Definition bluetooth.h:853
const bt_addr_le_t * peer
Directed advertising to peer.
Definition bluetooth.h:888
uint8_t sid
Advertising Set Identifier, valid range 0x00 - 0x0f.
Definition bluetooth.h:840
uint8_t secondary_max_skip
Secondary channel maximum skip count.
Definition bluetooth.h:850
uint32_t interval_min
Minimum Advertising Interval (N * 0.625 milliseconds) Minimum Advertising Interval shall be less than...
Definition bluetooth.h:862
uint8_t id
Local identity.
Definition bluetooth.h:833
uint32_t interval_max
Maximum Advertising Interval (N * 0.625 milliseconds) Minimum Advertising Interval shall be less than...
Definition bluetooth.h:871
Definition bluetooth.h:114
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:151
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:138
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:126
Definition bluetooth.h:71
struct bt_conn * conn
Connection object of the new connection.
Definition bluetooth.h:73
Advertising set info structure.
Definition bluetooth.h:1465
uint8_t id
Definition bluetooth.h:1467
const bt_addr_le_t * addr
Current local advertising address used.
Definition bluetooth.h:1473
int8_t tx_power
Currently selected Transmit Power (dBM).
Definition bluetooth.h:1470
Definition bluetooth.h:76
bt_addr_le_t * addr
Active scanner LE address and type.
Definition bluetooth.h:78
Definition bluetooth.h:66
uint8_t num_sent
The number of advertising events completed.
Definition bluetooth.h:68
Definition bluetooth.h:1332
uint16_t timeout
Advertiser timeout (N * 10 ms).
Definition bluetooth.h:1346
uint8_t num_events
Number of advertising events.
Definition bluetooth.h:1353
LE Secure Connections pairing Out of Band data.
Definition bluetooth.h:2574
uint8_t c[16]
Confirm Value.
Definition bluetooth.h:2579
uint8_t r[16]
Random Number.
Definition bluetooth.h:2576
LE Out of Band information.
Definition bluetooth.h:2583
bt_addr_le_t addr
LE address.
Definition bluetooth.h:2587
struct bt_le_oob_sc_data le_sc_data
LE Secure Connections pairing Out of Band data.
Definition bluetooth.h:2590
Definition bluetooth.h:81
uint8_t count
The number of subevents data can be set for.
Definition bluetooth.h:86
uint8_t start
The first subevent data can be set for.
Definition bluetooth.h:83
Definition bluetooth.h:912
uint16_t interval_min
Minimum Periodic Advertising Interval (N * 1.25 ms)
Definition bluetooth.h:919
uint16_t interval_max
Maximum Periodic Advertising Interval (N * 1.25 ms)
Definition bluetooth.h:927
uint32_t options
Bit-field of periodic advertising options.
Definition bluetooth.h:930
Definition bluetooth.h:89
uint8_t subevent
The subevent the response was received in.
Definition bluetooth.h:91
int8_t rssi
The RSSI of the response in dBm.
Definition bluetooth.h:105
uint8_t cte_type
The Constant Tone Extension (CTE) of the advertisement (bt_df_cte_type)
Definition bluetooth.h:108
int8_t tx_power
The TX power of the response in dBm.
Definition bluetooth.h:102
uint8_t response_slot
The slot the response was received in.
Definition bluetooth.h:111
uint8_t tx_status
Status of the subevent indication.
Definition bluetooth.h:99
Definition bluetooth.h:2727
uint8_t response_subevent
The subevent the response shall be sent in.
Definition bluetooth.h:2746
uint16_t request_event
The periodic event counter of the request the response is sent to.
Definition bluetooth.h:2736
uint8_t request_subevent
The subevent counter of the request the response is sent to.
Definition bluetooth.h:2743
uint8_t response_slot
The response slot the response shall be sent in.
Definition bluetooth.h:2749
Definition bluetooth.h:1534
uint8_t response_slot_start
The first response slot to listen to.
Definition bluetooth.h:1539
const struct net_buf_simple * data
The data to send.
Definition bluetooth.h:1545
uint8_t subevent
The subevent to set data for.
Definition bluetooth.h:1536
uint8_t response_slot_count
The number of response slots to listen to.
Definition bluetooth.h:1542
Definition bluetooth.h:1685
sys_snode_t node
Definition bluetooth.h:1763
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:1724
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:1738
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:1696
void(* biginfo)(struct bt_le_per_adv_sync *sync, const struct bt_iso_biginfo *biginfo)
BIGInfo advertising report received.
Definition bluetooth.h:1751
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:1708
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:1760
Advertising set info structure.
Definition bluetooth.h:1868
uint16_t interval
Periodic advertising interval (N * 1.25 ms)
Definition bluetooth.h:1876
uint8_t phy
Advertiser PHY.
Definition bluetooth.h:1879
bt_addr_le_t addr
Periodic Advertiser Address.
Definition bluetooth.h:1870
uint8_t sid
Advertiser SID.
Definition bluetooth.h:1873
Definition bluetooth.h:1802
uint16_t timeout
Synchronization timeout (N * 10 ms)
Definition bluetooth.h:1837
uint32_t options
Bit-field of periodic advertising sync options.
Definition bluetooth.h:1820
uint8_t sid
Advertiser SID.
Definition bluetooth.h:1817
bt_addr_le_t addr
Periodic Advertiser Address.
Definition bluetooth.h:1809
uint16_t skip
Maximum event skip.
Definition bluetooth.h:1829
Definition bluetooth.h:1655
uint8_t cte_type
The Constant Tone Extension (CTE) of the advertisement (bt_df_cte_type)
Definition bluetooth.h:1669
uint8_t sid
Advertiser SID.
Definition bluetooth.h:1660
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:1657
int8_t tx_power
The TX power of the advertisement.
Definition bluetooth.h:1663
int8_t rssi
The RSSI of the advertisement excluding any CTE.
Definition bluetooth.h:1666
Definition bluetooth.h:1680
bool recv_enabled
True if receiving periodic advertisements, false otherwise.
Definition bluetooth.h:1682
Definition bluetooth.h:2695
uint8_t * subevents
The subevent(s) to synchronize with.
Definition bluetooth.h:2711
uint16_t properties
Periodic Advertising Properties.
Definition bluetooth.h:2701
uint8_t num_subevents
Number of subevents to sync to.
Definition bluetooth.h:2704
Definition bluetooth.h:1598
bool recv_enabled
True if receiving periodic advertisements, false otherwise.
Definition bluetooth.h:1612
uint16_t interval
Periodic advertising interval (N * 1.25 ms)
Definition bluetooth.h:1606
uint8_t sid
Advertiser SID.
Definition bluetooth.h:1603
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:1600
uint8_t phy
Advertiser PHY.
Definition bluetooth.h:1609
struct bt_conn * conn
Peer that transferred the periodic advertising sync.
Definition bluetooth.h:1627
uint16_t service_data
Service Data provided by the peer when sync is transferred.
Definition bluetooth.h:1619
Definition bluetooth.h:1644
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:1646
uint8_t reason
Cause of periodic advertising termination.
Definition bluetooth.h:1652
uint8_t sid
Advertiser SID.
Definition bluetooth.h:1649
Definition bluetooth.h:2027
uint32_t options
Periodic Advertising Sync Transfer options.
Definition bluetooth.h:2045
uint16_t timeout
Synchronization timeout (N * 10 ms)
Definition bluetooth.h:2042
uint16_t skip
Maximum event skip.
Definition bluetooth.h:2034
Listener context for (LE) scanning.
Definition bluetooth.h:2293
void(* timeout)(void)
The scanner has stopped scanning after scan timeout.
Definition bluetooth.h:2305
sys_snode_t node
Definition bluetooth.h:2307
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:2301
LE scan parameters.
Definition bluetooth.h:2189
uint8_t type
Scan type (BT_LE_SCAN_TYPE_ACTIVE or BT_LE_SCAN_TYPE_PASSIVE)
Definition bluetooth.h:2191
uint16_t interval
Scan interval (N * 0.625 ms).
Definition bluetooth.h:2204
uint16_t window
Scan window (N * 0.625 ms)
Definition bluetooth.h:2214
uint16_t timeout
Scan timeout (N * 10 ms)
Definition bluetooth.h:2222
uint16_t interval_coded
Scan interval LE Coded PHY (N * 0.625 MS)
Definition bluetooth.h:2229
uint16_t window_coded
Scan window LE Coded PHY (N * 0.625 MS)
Definition bluetooth.h:2236
uint8_t options
Bit-field of scanning options.
Definition bluetooth.h:2194
LE advertisement and scan response packet information.
Definition bluetooth.h:2240
uint16_t interval
Periodic advertising interval (N * 1.25 ms).
Definition bluetooth.h:2283
int8_t tx_power
Transmit power of the advertiser.
Definition bluetooth.h:2256
uint8_t sid
Advertising Set Identifier.
Definition bluetooth.h:2250
uint8_t primary_phy
Primary advertising channel PHY.
Definition bluetooth.h:2286
int8_t rssi
Strength of advertiser signal.
Definition bluetooth.h:2253
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:2247
uint8_t secondary_phy
Secondary advertising channel PHY.
Definition bluetooth.h:2289
uint8_t adv_type
Advertising packet type.
Definition bluetooth.h:2266
uint16_t adv_props
Advertising packet properties bitfield.
Definition bluetooth.h:2276
Simple network buffer representation.
Definition net_buf.h:89
uint8_t * data
Pointer to the start of data in the buffer.
Definition net_buf.h:91
Misc utilities.