Zephyr Project API 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bluetooth.h
Go to the documentation of this file.
1
6/*
7 * Copyright (c) 2017 Nordic Semiconductor ASA
8 * Copyright (c) 2015-2016 Intel Corporation
9 *
10 * SPDX-License-Identifier: Apache-2.0
11 */
12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_BLUETOOTH_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_BLUETOOTH_H_
14
30#include <stdbool.h>
31#include <stdint.h>
32#include <string.h>
33
38#include <zephyr/net_buf.h>
39#include <zephyr/sys/slist.h>
40#include <zephyr/sys/util.h>
42#include <zephyr/toolchain.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
71#define BT_ID_DEFAULT 0
72
78#define BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE 8
79
81struct bt_le_ext_adv;
82
84struct bt_le_per_adv_sync;
85
86/* Don't require everyone to include conn.h */
87struct bt_conn;
88
89/* Don't require everyone to include iso.h */
90struct bt_iso_biginfo;
91
92/* Don't require everyone to include direction.h */
94
109
117 struct bt_conn *conn;
118};
119
129
146
181
213 void (*sent)(struct bt_le_ext_adv *adv,
214 struct bt_le_ext_adv_sent_info *info);
215
225 void (*connected)(struct bt_le_ext_adv *adv,
226 struct bt_le_ext_adv_connected_info *info);
227
238 void (*scanned)(struct bt_le_ext_adv *adv,
239 struct bt_le_ext_adv_scanned_info *info);
240
241#if defined(CONFIG_BT_PRIVACY)
258 bool (*rpa_expired)(struct bt_le_ext_adv *adv);
259#endif /* defined(CONFIG_BT_PRIVACY) */
260
261#if defined(CONFIG_BT_PER_ADV_RSP)
271 void (*pawr_data_request)(struct bt_le_ext_adv *adv,
272 const struct bt_le_per_adv_data_request *request);
282 void (*pawr_response)(struct bt_le_ext_adv *adv, struct bt_le_per_adv_response_info *info,
283 struct net_buf_simple *buf);
284
285#endif /* defined(CONFIG_BT_PER_ADV_RSP) */
286};
287
294typedef void (*bt_ready_cb_t)(int err);
295
316
336int bt_disable(void);
337
343bool bt_is_ready(void);
344
362int bt_set_name(const char *name);
363
371const char *bt_get_name(void);
372
384
398int bt_set_appearance(uint16_t new_appearance);
399
419void bt_id_get(bt_addr_le_t *addrs, size_t *count);
420
464
492
510
522#define BT_DATA_SERIALIZED_SIZE(data_len) ((data_len) + 2)
523
539
550#define BT_DATA(_type, _data, _data_len) \
551 { \
552 .type = (_type), \
553 .data_len = (_data_len), \
554 .data = (const uint8_t *)(_data), \
555 }
556
566#define BT_DATA_BYTES(_type, _bytes...) \
567 BT_DATA(_type, ((uint8_t []) { _bytes }), \
568 sizeof((uint8_t []) { _bytes }))
569
582size_t bt_data_get_len(const struct bt_data data[], size_t data_count);
583
597size_t bt_data_serialize(const struct bt_data *input, uint8_t *output);
598
668
681
988
1067
1068
1090
1112
1120
1123
1124#if defined(CONFIG_BT_PER_ADV_RSP)
1130 uint8_t num_subevents;
1131
1137 uint8_t subevent_interval;
1138
1144 uint8_t response_slot_delay;
1145
1151 uint8_t response_slot_spacing;
1152
1158 uint8_t num_response_slots;
1159#endif /* CONFIG_BT_PER_ADV_RSP */
1160};
1161
1171#define BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
1172{ \
1173 .id = BT_ID_DEFAULT, \
1174 .sid = 0, \
1175 .secondary_max_skip = 0, \
1176 .options = (_options), \
1177 .interval_min = (_int_min), \
1178 .interval_max = (_int_max), \
1179 .peer = (_peer), \
1180}
1181
1191#define BT_LE_ADV_PARAM(_options, _int_min, _int_max, _peer) \
1192 ((const struct bt_le_adv_param[]) { \
1193 BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
1194 })
1195
1196#define BT_LE_ADV_CONN_DIR(_peer) BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, 0, 0, _peer)
1197
1204#define BT_LE_ADV_CONN \
1205 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, BT_GAP_ADV_FAST_INT_MIN_2, \
1206 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1207 __DEPRECATED_MACRO
1208
1237#define BT_LE_ADV_CONN_FAST_1 \
1238 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_1, BT_GAP_ADV_FAST_INT_MAX_1, \
1239 NULL)
1240
1261#define BT_LE_ADV_CONN_FAST_2 \
1262 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, \
1263 NULL)
1264
1265#define BT_LE_ADV_CONN_ONE_TIME BT_LE_ADV_CONN_FAST_2 __DEPRECATED_MACRO
1266
1271#define BT_LE_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
1272 BT_LE_ADV_OPT_USE_NAME, \
1273 BT_GAP_ADV_FAST_INT_MIN_2, \
1274 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1275 __DEPRECATED_MACRO
1276
1281#define BT_LE_ADV_CONN_NAME_AD BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
1282 BT_LE_ADV_OPT_USE_NAME | \
1283 BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \
1284 BT_GAP_ADV_FAST_INT_MIN_2, \
1285 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1286 __DEPRECATED_MACRO
1287
1288#define BT_LE_ADV_CONN_DIR_LOW_DUTY(_peer) \
1289 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY, \
1290 BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, _peer)
1291
1293#define BT_LE_ADV_NCONN BT_LE_ADV_PARAM(0, BT_GAP_ADV_FAST_INT_MIN_2, \
1294 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1295
1302#define BT_LE_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_NAME, \
1303 BT_GAP_ADV_FAST_INT_MIN_2, \
1304 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1305 __DEPRECATED_MACRO
1306
1308#define BT_LE_ADV_NCONN_IDENTITY BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, \
1309 BT_GAP_ADV_FAST_INT_MIN_2, \
1310 BT_GAP_ADV_FAST_INT_MAX_2, \
1311 NULL)
1312
1314#define BT_LE_EXT_ADV_CONN \
1315 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, \
1316 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1317
1324#define BT_LE_EXT_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1325 BT_LE_ADV_OPT_CONNECTABLE | \
1326 BT_LE_ADV_OPT_USE_NAME, \
1327 BT_GAP_ADV_FAST_INT_MIN_2, \
1328 BT_GAP_ADV_FAST_INT_MAX_2, \
1329 NULL) \
1330 __DEPRECATED_MACRO
1331
1333#define BT_LE_EXT_ADV_SCAN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1334 BT_LE_ADV_OPT_SCANNABLE, \
1335 BT_GAP_ADV_FAST_INT_MIN_2, \
1336 BT_GAP_ADV_FAST_INT_MAX_2, \
1337 NULL)
1338
1345#define BT_LE_EXT_ADV_SCAN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1346 BT_LE_ADV_OPT_SCANNABLE | \
1347 BT_LE_ADV_OPT_USE_NAME, \
1348 BT_GAP_ADV_FAST_INT_MIN_2, \
1349 BT_GAP_ADV_FAST_INT_MAX_2, \
1350 NULL) \
1351 __DEPRECATED_MACRO
1352
1354#define BT_LE_EXT_ADV_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV, \
1355 BT_GAP_ADV_FAST_INT_MIN_2, \
1356 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1357
1364#define BT_LE_EXT_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1365 BT_LE_ADV_OPT_USE_NAME, \
1366 BT_GAP_ADV_FAST_INT_MIN_2, \
1367 BT_GAP_ADV_FAST_INT_MAX_2, \
1368 NULL) \
1369 __DEPRECATED_MACRO
1370
1372#define BT_LE_EXT_ADV_NCONN_IDENTITY \
1373 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1374 BT_LE_ADV_OPT_USE_IDENTITY, \
1375 BT_GAP_ADV_FAST_INT_MIN_2, \
1376 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1377
1379#define BT_LE_EXT_ADV_CODED_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1380 BT_LE_ADV_OPT_CODED, \
1381 BT_GAP_ADV_FAST_INT_MIN_2, \
1382 BT_GAP_ADV_FAST_INT_MAX_2, \
1383 NULL)
1384
1392#define BT_LE_EXT_ADV_CODED_NCONN_NAME \
1393 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1394 BT_LE_ADV_OPT_USE_NAME, \
1395 BT_GAP_ADV_FAST_INT_MIN_2, \
1396 BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1397 __DEPRECATED_MACRO
1398
1402#define BT_LE_EXT_ADV_CODED_NCONN_IDENTITY \
1403 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1404 BT_LE_ADV_OPT_USE_IDENTITY, \
1405 BT_GAP_ADV_FAST_INT_MIN_2, \
1406 BT_GAP_ADV_FAST_INT_MAX_2, NULL)
1407
1414#define BT_LE_EXT_ADV_START_PARAM_INIT(_timeout, _n_evts) \
1415{ \
1416 .timeout = (_timeout), \
1417 .num_events = (_n_evts), \
1418}
1419
1426#define BT_LE_EXT_ADV_START_PARAM(_timeout, _n_evts) \
1427 ((const struct bt_le_ext_adv_start_param[]) { \
1428 BT_LE_EXT_ADV_START_PARAM_INIT((_timeout), (_n_evts)) \
1429 })
1430
1431#define BT_LE_EXT_ADV_START_DEFAULT BT_LE_EXT_ADV_START_PARAM(0, 0)
1432
1441#define BT_LE_PER_ADV_PARAM_INIT(_int_min, _int_max, _options) \
1442{ \
1443 .interval_min = (_int_min), \
1444 .interval_max = (_int_max), \
1445 .options = (_options), \
1446}
1447
1456#define BT_LE_PER_ADV_PARAM(_int_min, _int_max, _options) \
1457 ((struct bt_le_per_adv_param[]) { \
1458 BT_LE_PER_ADV_PARAM_INIT(_int_min, _int_max, _options) \
1459 })
1460
1461#define BT_LE_PER_ADV_DEFAULT BT_LE_PER_ADV_PARAM(BT_GAP_PER_ADV_SLOW_INT_MIN, \
1462 BT_GAP_PER_ADV_SLOW_INT_MAX, \
1463 BT_LE_PER_ADV_OPT_NONE)
1464
1493int bt_le_adv_start(const struct bt_le_adv_param *param,
1494 const struct bt_data *ad, size_t ad_len,
1495 const struct bt_data *sd, size_t sd_len);
1496
1509int bt_le_adv_update_data(const struct bt_data *ad, size_t ad_len,
1510 const struct bt_data *sd, size_t sd_len);
1511
1520
1541 const struct bt_le_ext_adv_cb *cb,
1542 struct bt_le_ext_adv **adv);
1543
1604
1620int bt_le_ext_adv_start(struct bt_le_ext_adv *adv,
1621 const struct bt_le_ext_adv_start_param *param);
1622
1633int bt_le_ext_adv_stop(struct bt_le_ext_adv *adv);
1634
1670int bt_le_ext_adv_set_data(struct bt_le_ext_adv *adv,
1671 const struct bt_data *ad, size_t ad_len,
1672 const struct bt_data *sd, size_t sd_len);
1673
1690int bt_le_ext_adv_update_param(struct bt_le_ext_adv *adv,
1691 const struct bt_le_adv_param *param);
1692
1702int bt_le_ext_adv_delete(struct bt_le_ext_adv *adv);
1703
1715uint8_t bt_le_ext_adv_get_index(struct bt_le_ext_adv *adv);
1716
1728
1737int bt_le_ext_adv_get_info(const struct bt_le_ext_adv *adv,
1738 struct bt_le_ext_adv_info *info);
1739
1753typedef void bt_le_scan_cb_t(const bt_addr_le_t *addr, int8_t rssi,
1754 uint8_t adv_type, struct net_buf_simple *buf);
1755
1769int bt_le_per_adv_set_param(struct bt_le_ext_adv *adv,
1770 const struct bt_le_per_adv_param *param);
1771
1786int bt_le_per_adv_set_data(const struct bt_le_ext_adv *adv,
1787 const struct bt_data *ad, size_t ad_len);
1788
1812
1828int bt_le_per_adv_set_subevent_data(const struct bt_le_ext_adv *adv, uint8_t num_subevents,
1829 const struct bt_le_per_adv_subevent_data_params *params);
1830
1848int bt_le_per_adv_start(struct bt_le_ext_adv *adv);
1849
1861int bt_le_per_adv_stop(struct bt_le_ext_adv *adv);
1862
1878
1881
1884
1887
1890
1897
1904 struct bt_conn *conn;
1905#if defined(CONFIG_BT_PER_ADV_SYNC_RSP)
1907 uint8_t num_subevents;
1908
1910 uint8_t subevent_interval;
1911
1913 uint8_t response_slot_delay;
1914
1916 uint8_t response_slot_spacing;
1917
1918#endif /* CONFIG_BT_PER_ADV_SYNC_RSP */
1919};
1920
1941
1956
1959
1962
1965
1968#if defined(CONFIG_BT_PER_ADV_SYNC_RSP)
1970 uint16_t periodic_event_counter;
1971
1973 uint8_t subevent;
1974#endif /* CONFIG_BT_PER_ADV_SYNC_RSP */
1975};
1976
1988
2011 void (*synced)(struct bt_le_per_adv_sync *sync,
2012 struct bt_le_per_adv_sync_synced_info *info);
2013
2024 void (*term)(struct bt_le_per_adv_sync *sync,
2025 const struct bt_le_per_adv_sync_term_info *info);
2026
2040 void (*recv)(struct bt_le_per_adv_sync *sync,
2041 const struct bt_le_per_adv_sync_recv_info *info,
2042 struct net_buf_simple *buf);
2043
2054 void (*state_changed)(struct bt_le_per_adv_sync *sync,
2055 const struct bt_le_per_adv_sync_state_info *info);
2056
2067 void (*biginfo)(struct bt_le_per_adv_sync *sync, const struct bt_iso_biginfo *biginfo);
2068
2076 void (*cte_report_cb)(struct bt_le_per_adv_sync *sync,
2077 struct bt_df_per_adv_sync_iq_samples_report const *info);
2078
2080};
2081
2117
2167
2179uint8_t bt_le_per_adv_sync_get_index(struct bt_le_per_adv_sync *per_adv_sync);
2180
2193struct bt_le_per_adv_sync *bt_le_per_adv_sync_lookup_index(uint8_t index);
2194
2209
2218int bt_le_per_adv_sync_get_info(struct bt_le_per_adv_sync *per_adv_sync,
2219 struct bt_le_per_adv_sync_info *info);
2220
2229struct bt_le_per_adv_sync *bt_le_per_adv_sync_lookup_addr(const bt_addr_le_t *adv_addr,
2230 uint8_t sid);
2231
2249 struct bt_le_per_adv_sync **out_sync);
2250
2267int bt_le_per_adv_sync_delete(struct bt_le_per_adv_sync *per_adv_sync);
2268
2284
2294int bt_le_per_adv_sync_recv_enable(struct bt_le_per_adv_sync *per_adv_sync);
2295
2305int bt_le_per_adv_sync_recv_disable(struct bt_le_per_adv_sync *per_adv_sync);
2306
2354
2385
2398int bt_le_per_adv_sync_transfer(const struct bt_le_per_adv_sync *per_adv_sync,
2399 const struct bt_conn *conn,
2400 uint16_t service_data);
2401
2402
2415int bt_le_per_adv_set_info_transfer(const struct bt_le_ext_adv *adv,
2416 const struct bt_conn *conn,
2417 uint16_t service_data);
2418
2433 const struct bt_conn *conn,
2434 const struct bt_le_per_adv_sync_transfer_param *param);
2435
2449int bt_le_per_adv_sync_transfer_unsubscribe(const struct bt_conn *conn);
2450
2465
2478
2487
2488
2509
2523
2574
2627
2630
2637 void (*recv)(const struct bt_le_scan_recv_info *info,
2638 struct net_buf_simple *buf);
2639
2641 void (*timeout)(void);
2642
2644};
2645
2654#define BT_LE_SCAN_PARAM_INIT(_type, _options, _interval, _window) \
2655{ \
2656 .type = (_type), \
2657 .options = (_options), \
2658 .interval = (_interval), \
2659 .window = (_window), \
2660 .timeout = 0, \
2661 .interval_coded = 0, \
2662 .window_coded = 0, \
2663}
2664
2673#define BT_LE_SCAN_PARAM(_type, _options, _interval, _window) \
2674 ((struct bt_le_scan_param[]) { \
2675 BT_LE_SCAN_PARAM_INIT(_type, _options, _interval, _window) \
2676 })
2677
2681#define BT_LE_SCAN_ACTIVE BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2682 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2683 BT_GAP_SCAN_FAST_INTERVAL, \
2684 BT_GAP_SCAN_FAST_WINDOW)
2685
2691#define BT_LE_SCAN_ACTIVE_CONTINUOUS BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2692 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2693 BT_GAP_SCAN_FAST_INTERVAL_MIN, \
2694 BT_GAP_SCAN_FAST_WINDOW)
2696 "Continuous scanning is requested by setting window and interval equal.");
2697
2704#define BT_LE_SCAN_PASSIVE BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2705 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2706 BT_GAP_SCAN_FAST_INTERVAL, \
2707 BT_GAP_SCAN_FAST_WINDOW)
2708
2715#define BT_LE_SCAN_PASSIVE_CONTINUOUS BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2716 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2717 BT_GAP_SCAN_FAST_INTERVAL_MIN, \
2718 BT_GAP_SCAN_FAST_WINDOW)
2720 "Continuous scanning is requested by setting window and interval equal.");
2721
2726#define BT_LE_SCAN_CODED_ACTIVE \
2727 BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_ACTIVE, \
2728 BT_LE_SCAN_OPT_CODED | \
2729 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2730 BT_GAP_SCAN_FAST_INTERVAL, \
2731 BT_GAP_SCAN_FAST_WINDOW)
2732
2740#define BT_LE_SCAN_CODED_PASSIVE \
2741 BT_LE_SCAN_PARAM(BT_LE_SCAN_TYPE_PASSIVE, \
2742 BT_LE_SCAN_OPT_CODED | \
2743 BT_LE_SCAN_OPT_FILTER_DUPLICATE, \
2744 BT_GAP_SCAN_FAST_INTERVAL, \
2745 BT_GAP_SCAN_FAST_WINDOW)
2746
2777
2787
2802
2811
2827
2843
2857
2874
2891int bt_le_set_rpa_timeout(uint16_t new_rpa_timeout);
2892
2913 bool (*func)(struct bt_data *data, void *user_data),
2914 void *user_data);
2915
2920
2923};
2924
2935
2966
2991int bt_le_ext_adv_oob_get_local(struct bt_le_ext_adv *adv,
2992 struct bt_le_oob *oob);
2993
3004int bt_unpair(uint8_t id, const bt_addr_le_t *addr);
3005
3011
3020void bt_foreach_bond(uint8_t id, void (*func)(const struct bt_bond_info *info,
3021 void *user_data),
3022 void *user_data);
3023
3040 const uint8_t *vs_config);
3041
3069
3080int bt_le_per_adv_sync_subevent(struct bt_le_per_adv_sync *per_adv_sync,
3081 struct bt_le_per_adv_sync_subevent_params *params);
3082
3117
3130int bt_le_per_adv_set_response_data(struct bt_le_per_adv_sync *per_adv_sync,
3131 const struct bt_le_per_adv_response_params *params,
3132 const struct net_buf_simple *data);
3133
3147
3152#ifdef __cplusplus
3153}
3154#endif
3159#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 identity addresses.
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.
bool bt_le_bond_exists(uint8_t id, const bt_addr_le_t *addr)
Check if a device identified by a Bluetooth LE address is bonded.
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 array).
size_t bt_data_get_len(const struct bt_data data[], size_t data_count)
Get the total size (in octets) 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.
int bt_le_get_local_features(struct bt_le_local_features *local_features)
Get local Bluetooth LE controller features.
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:294
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.
bt_le_per_adv_sync_transfer_opt
Periodic Advertising Sync Transfer options.
Definition bluetooth.h:2308
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:1753
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.
#define BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE
Number of octets for local supported.
Definition bluetooth.h:78
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.
bt_le_scan_opt
Definition bluetooth.h:2489
int bt_id_reset(uint8_t id, bt_addr_le_t *addr, uint8_t *irk)
Reset/reclaim an identity address 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.
bt_le_per_adv_sync_opt
Periodic advertising sync options.
Definition bluetooth.h:2083
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 address.
bt_le_per_adv_opt
Periodic Advertising options.
Definition bluetooth.h:1070
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 address.
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.
bt_le_scan_type
Definition bluetooth.h:2510
bt_le_adv_opt
Advertising options.
Definition bluetooth.h:683
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:2317
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_REPORTING_INITIALLY_DISABLED
Sync to received PAST packets but don't generate sync reports.
Definition bluetooth.h:2344
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_2US
No Angle of Departure (AoD) 2.
Definition bluetooth.h:2333
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_1US
No Angle of Departure (AoD) 1 us.
Definition bluetooth.h:2325
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_FILTER_DUPLICATES
Sync to received PAST packets and generate sync reports with duplicate filtering.
Definition bluetooth.h:2352
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_ONLY_CTE
Only sync to packets with constant tone extension.
Definition bluetooth.h:2336
@ BT_LE_PER_ADV_SYNC_TRANSFER_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:2310
@ BT_LE_SCAN_OPT_FILTER_DUPLICATE
Filter duplicates.
Definition bluetooth.h:2494
@ BT_LE_SCAN_OPT_CODED
Enable scan on coded PHY (Long Range).
Definition bluetooth.h:2500
@ BT_LE_SCAN_OPT_NO_1M
Disable scan on 1M phy.
Definition bluetooth.h:2507
@ BT_LE_SCAN_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:2491
@ BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST
Filter using filter accept list.
Definition bluetooth.h:2497
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_2US
Sync with Angle of Departure (AoD) 2 us constant tone extension.
Definition bluetooth.h:2112
@ BT_LE_PER_ADV_SYNC_OPT_SYNC_ONLY_CONST_TONE_EXT
Do not sync to packets without a constant tone extension.
Definition bluetooth.h:2115
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_1US
Sync with Angle of Departure (AoD) 1 us constant tone extension.
Definition bluetooth.h:2109
@ BT_LE_PER_ADV_SYNC_OPT_FILTER_DUPLICATE
Filter duplicate Periodic Advertising reports.
Definition bluetooth.h:2103
@ BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOA
Sync with Angle of Arrival (AoA) constant tone extension.
Definition bluetooth.h:2106
@ BT_LE_PER_ADV_SYNC_OPT_REPORTING_INITIALLY_DISABLED
Disables periodic advertising reports.
Definition bluetooth.h:2100
@ BT_LE_PER_ADV_SYNC_OPT_USE_PER_ADV_LIST
Use the periodic advertising list to sync with advertiser.
Definition bluetooth.h:2093
@ BT_LE_PER_ADV_SYNC_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:2085
@ BT_LE_PER_ADV_OPT_INCLUDE_ADI
Advertise with included AdvDataInfo (ADI).
Definition bluetooth.h:1088
@ BT_LE_PER_ADV_OPT_USE_TX_POWER
Advertise with transmit power.
Definition bluetooth.h:1080
@ BT_LE_PER_ADV_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:1072
@ BT_LE_SCAN_TYPE_PASSIVE
Scan without requesting additional information from advertisers.
Definition bluetooth.h:2512
@ BT_LE_SCAN_TYPE_ACTIVE
Scan and request additional information from advertisers.
Definition bluetooth.h:2521
@ BT_LE_ADV_OPT_FORCE_NAME_IN_AD
Put GAP device name into advert data.
Definition bluetooth.h:938
@ 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:838
@ BT_LE_ADV_OPT_ANONYMOUS
Advertise without a device address (identity address or RPA).
Definition bluetooth.h:908
@ BT_LE_ADV_OPT_USE_NRPA
Advertise using a Non-Resolvable Private Address.
Definition bluetooth.h:952
@ BT_LE_ADV_OPT_CONNECTABLE
Advertise as connectable.
Definition bluetooth.h:707
@ BT_LE_ADV_OPT_USE_NAME
Advertise using GAP device name.
Definition bluetooth.h:803
@ BT_LE_ADV_OPT_USE_IDENTITY
Advertise using identity address.
Definition bluetooth.h:777
@ BT_LE_ADV_OPT_ONE_TIME
Advertise one time.
Definition bluetooth.h:737
@ BT_LE_ADV_OPT_FILTER_SCAN_REQ
Use filter accept list to filter devices that can request scan response data.
Definition bluetooth.h:830
@ BT_LE_ADV_OPT_DISABLE_CHAN_39
Disable advertising on channel index 39.
Definition bluetooth.h:925
@ BT_LE_ADV_OPT_NONE
Convenience value when no options are specified.
Definition bluetooth.h:685
@ BT_LE_ADV_OPT_REQUIRE_S2_CODING
Configures the advertiser to use the S=2 coding scheme for LE Coded PHY.
Definition bluetooth.h:969
@ BT_LE_ADV_OPT_CONN
Connectable advertising.
Definition bluetooth.h:765
@ BT_LE_ADV_OPT_REQUIRE_S8_CODING
Configures the advertiser to use the S=8 coding scheme for LE Coded PHY.
Definition bluetooth.h:986
@ BT_LE_ADV_OPT_DISABLE_CHAN_37
Disable advertising on channel index 37.
Definition bluetooth.h:919
@ BT_LE_ADV_OPT_DISABLE_CHAN_38
Disable advertising on channel index 38.
Definition bluetooth.h:922
@ BT_LE_ADV_OPT_DIR_ADDR_RPA
Directed advertising to privacy-enabled peer.
Definition bluetooth.h:825
@ BT_LE_ADV_OPT_CODED
Advertise on the LE Coded PHY (Long Range).
Definition bluetooth.h:900
@ BT_LE_ADV_OPT_FILTER_CONN
Use filter accept list to filter devices that can connect.
Definition bluetooth.h:833
@ BT_LE_ADV_OPT_EXT_ADV
Advertise with extended advertising.
Definition bluetooth.h:870
@ BT_LE_ADV_OPT_SCANNABLE
Support scan response data.
Definition bluetooth.h:848
@ BT_LE_ADV_OPT_NO_2M
Disable use of LE 2M PHY on the secondary advertising channel.
Definition bluetooth.h:887
@ BT_LE_ADV_OPT_USE_TX_POWER
Advertise with transmit power.
Definition bluetooth.h:916
@ BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY
Low duty cycle directed advertising.
Definition bluetooth.h:811
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
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__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:3007
bt_addr_le_t addr
Address of the remote device.
Definition bluetooth.h:3009
Bluetooth data.
Definition bluetooth.h:531
uint8_t type
Type of scan response data or advertisement data.
Definition bluetooth.h:533
uint8_t data_len
Length of scan response data or advertisement data.
Definition bluetooth.h:535
const uint8_t * data
Pointer to Scan response or advertisement data.
Definition bluetooth.h:537
Definition direction.h:118
Broadcast Isochronous Group (BIG) information.
Definition iso.h:648
LE Advertising Parameters.
Definition bluetooth.h:990
uint32_t options
Bit-field of advertising options, see the bt_le_adv_opt field.
Definition bluetooth.h:1024
const bt_addr_le_t * peer
Directed advertising to peer.
Definition bluetooth.h:1065
uint8_t sid
Advertising Set Identifier, valid range is BT_GAP_SID_MIN to BT_GAP_SID_MAX.
Definition bluetooth.h:1010
uint8_t secondary_max_skip
Secondary channel maximum skip count.
Definition bluetooth.h:1021
uint32_t interval_min
Minimum Advertising Interval (N * 0.625 milliseconds)
Definition bluetooth.h:1036
uint8_t id
Local identity handle.
Definition bluetooth.h:1001
uint32_t interval_max
Maximum Advertising Interval (N * 0.625 milliseconds)
Definition bluetooth.h:1048
Callback struct to notify about advertiser activity.
Definition bluetooth.h:202
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:238
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:225
void(* sent)(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_sent_info *info)
The advertising set was disabled after reaching limit.
Definition bluetooth.h:213
Info of the advertising connected event.
Definition bluetooth.h:115
struct bt_conn * conn
Connection object of the new connection.
Definition bluetooth.h:117
Advertising set info structure.
Definition bluetooth.h:1718
uint8_t id
Local identity handle.
Definition bluetooth.h:1720
const bt_addr_le_t * addr
Current local advertising address used.
Definition bluetooth.h:1726
int8_t tx_power
Currently selected Transmit Power (dBM).
Definition bluetooth.h:1723
Info of the advertising scanned event.
Definition bluetooth.h:125
bt_addr_le_t * addr
Active scanner LE address and type.
Definition bluetooth.h:127
Info of the advertising sent event.
Definition bluetooth.h:100
uint8_t num_sent
If the advertising set was started with a non-zero bt_le_ext_adv_start_param::num_events,...
Definition bluetooth.h:107
Parameters for starting an extended advertising session.
Definition bluetooth.h:1557
uint16_t timeout
Maximum advertising set duration (N * 10 ms)
Definition bluetooth.h:1582
uint8_t num_events
Maximum number of extended advertising events to be sent.
Definition bluetooth.h:1602
Local Bluetooth LE controller features and capabilities.
Definition bluetooth.h:610
uint8_t acl_pkts
Total number of ACL data packets.
Definition bluetooth.h:638
uint16_t acl_mtu
ACL data packet length.
Definition bluetooth.h:636
uint8_t features[8]
Local LE controller supported features.
Definition bluetooth.h:618
uint8_t iso_pkts
Total number of ISO data packets.
Definition bluetooth.h:650
uint16_t max_adv_data_len
Maximum advertising data length.
Definition bluetooth.h:666
uint64_t states
Local LE controller supported states.
Definition bluetooth.h:626
uint8_t rl_size
Maximum size of the controller resolving list.
Definition bluetooth.h:657
uint16_t iso_mtu
ISO data packet length.
Definition bluetooth.h:648
LE Secure Connections pairing Out of Band data.
Definition bluetooth.h:2917
uint8_t c[16]
Confirm Value.
Definition bluetooth.h:2922
uint8_t r[16]
Random Number.
Definition bluetooth.h:2919
LE Out of Band information.
Definition bluetooth.h:2926
bt_addr_le_t addr
LE address.
Definition bluetooth.h:2930
struct bt_le_oob_sc_data le_sc_data
LE Secure Connections pairing Out of Band data.
Definition bluetooth.h:2933
Info of the PAwR subevents.
Definition bluetooth.h:139
uint8_t count
The number of subevents data can be set for.
Definition bluetooth.h:144
uint8_t start
The first subevent data can be set for.
Definition bluetooth.h:141
Parameters for configuring periodic advertising.
Definition bluetooth.h:1104
uint16_t interval_min
Minimum Periodic Advertising Interval (N * 1.25 ms)
Definition bluetooth.h:1111
uint16_t interval_max
Maximum Periodic Advertising Interval (N * 1.25 ms)
Definition bluetooth.h:1119
uint32_t options
Bit-field of periodic advertising options, see the bt_le_adv_opt field.
Definition bluetooth.h:1122
Info about the PAwR responses received.
Definition bluetooth.h:157
uint8_t subevent
The subevent the response was received in.
Definition bluetooth.h:159
int8_t rssi
The RSSI of the response in dBm.
Definition bluetooth.h:173
uint8_t cte_type
The Constant Tone Extension (CTE) of the advertisement (bt_df_cte_type)
Definition bluetooth.h:176
int8_t tx_power
The TX power of the response in dBm.
Definition bluetooth.h:170
uint8_t response_slot
The slot the response was received in.
Definition bluetooth.h:179
uint8_t tx_status
Status of the subevent indication.
Definition bluetooth.h:167
Parameters for sending a periodic advertising response.
Definition bluetooth.h:3091
uint8_t response_subevent
The subevent the response shall be sent in.
Definition bluetooth.h:3112
uint16_t request_event
The periodic event counter of the request the response is sent to.
Definition bluetooth.h:3101
uint8_t request_subevent
The subevent counter of the request the response is sent to.
Definition bluetooth.h:3109
uint8_t response_slot
The response slot the response shall be sent in.
Definition bluetooth.h:3115
Parameters for setting data for a specific periodic advertising with response subevent.
Definition bluetooth.h:1799
uint8_t response_slot_start
The first response slot to listen to.
Definition bluetooth.h:1804
const struct net_buf_simple * data
The data to send.
Definition bluetooth.h:1810
uint8_t subevent
The subevent to set data for.
Definition bluetooth.h:1801
uint8_t response_slot_count
The number of response slots to listen to.
Definition bluetooth.h:1807
Callback struct for periodic advertising sync events.
Definition bluetooth.h:2000
sys_snode_t node
Definition bluetooth.h:2079
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:2040
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:2054
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:2011
void(* biginfo)(struct bt_le_per_adv_sync *sync, const struct bt_iso_biginfo *biginfo)
BIGInfo advertising report received.
Definition bluetooth.h:2067
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:2024
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:2076
Periodic advertising set info structure.
Definition bluetooth.h:2196
uint16_t interval
Periodic advertising interval (N * 1.25 ms)
Definition bluetooth.h:2204
uint8_t phy
Advertiser PHY (see bt_gap_le_phy).
Definition bluetooth.h:2207
bt_addr_le_t addr
Periodic Advertiser Address.
Definition bluetooth.h:2198
uint8_t sid
Advertising Set Identifier, valid range BT_GAP_SID_MIN to BT_GAP_SID_MAX.
Definition bluetooth.h:2201
Parameters for creating a periodic advertising sync object.
Definition bluetooth.h:2129
uint16_t timeout
Synchronization timeout (N * 10 ms)
Definition bluetooth.h:2165
uint32_t options
Bit-field of periodic advertising sync options, see the bt_le_adv_opt field.
Definition bluetooth.h:2148
uint8_t sid
Advertising Set Identifier.
Definition bluetooth.h:2145
bt_addr_le_t addr
Periodic Advertiser Address.
Definition bluetooth.h:2136
uint16_t skip
Maximum event skip.
Definition bluetooth.h:2157
Information about a received periodic advertising report.
Definition bluetooth.h:1953
uint8_t cte_type
The Constant Tone Extension (CTE) of the advertisement (bt_df_cte_type)
Definition bluetooth.h:1967
uint8_t sid
Advertising Set Identifier, valid range BT_GAP_SID_MIN to BT_GAP_SID_MAX.
Definition bluetooth.h:1958
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:1955
int8_t tx_power
The TX power of the advertisement.
Definition bluetooth.h:1961
int8_t rssi
The RSSI of the advertisement excluding any CTE.
Definition bluetooth.h:1964
Information about the state of periodic advertising sync.
Definition bluetooth.h:1984
bool recv_enabled
True if receiving periodic advertisements, false otherwise.
Definition bluetooth.h:1986
Parameters for synchronizing with specific periodic advertising subevents.
Definition bluetooth.h:3051
uint8_t * subevents
The subevent(s) to synchronize with.
Definition bluetooth.h:3067
uint16_t properties
Periodic Advertising Properties.
Definition bluetooth.h:3057
uint8_t num_subevents
Number of subevents to sync to.
Definition bluetooth.h:3060
Information about the successful synchronization with periodic advertising.
Definition bluetooth.h:1875
bool recv_enabled
True if receiving periodic advertisements, false otherwise.
Definition bluetooth.h:1889
uint16_t interval
Periodic advertising interval (N * 1.25 ms)
Definition bluetooth.h:1883
uint8_t sid
Advertising Set Identifier, valid range BT_GAP_SID_MIN to BT_GAP_SID_MAX.
Definition bluetooth.h:1880
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:1877
uint8_t phy
Advertiser PHY (see bt_gap_le_phy).
Definition bluetooth.h:1886
struct bt_conn * conn
Peer that transferred the periodic advertising sync.
Definition bluetooth.h:1904
uint16_t service_data
Service Data provided by the peer when sync is transferred.
Definition bluetooth.h:1896
Information about the termination of a periodic advertising sync.
Definition bluetooth.h:1931
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:1933
uint8_t reason
Cause of periodic advertising termination (see the BT_HCI_ERR_* values).
Definition bluetooth.h:1939
uint8_t sid
Advertising Set Identifier, valid range BT_GAP_SID_MIN to BT_GAP_SID_MAX.
Definition bluetooth.h:1936
Parameters for periodic advertising sync transfer.
Definition bluetooth.h:2365
uint32_t options
Periodic Advertising Sync Transfer options, see bt_le_per_adv_sync_transfer_opt.
Definition bluetooth.h:2383
uint16_t timeout
Synchronization timeout (N * 10 ms)
Definition bluetooth.h:2380
uint16_t skip
Maximum event skip.
Definition bluetooth.h:2372
Listener context for (LE) scanning.
Definition bluetooth.h:2629
void(* timeout)(void)
The scanner has stopped scanning after scan timeout.
Definition bluetooth.h:2641
sys_snode_t node
Definition bluetooth.h:2643
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:2637
LE scan parameters.
Definition bluetooth.h:2525
uint8_t type
Scan type.
Definition bluetooth.h:2527
uint16_t interval
Scan interval (N * 0.625 ms).
Definition bluetooth.h:2540
uint16_t window
Scan window (N * 0.625 ms)
Definition bluetooth.h:2550
uint16_t timeout
Scan timeout (N * 10 ms)
Definition bluetooth.h:2558
uint16_t interval_coded
Scan interval LE Coded PHY (N * 0.625 MS)
Definition bluetooth.h:2565
uint16_t window_coded
Scan window LE Coded PHY (N * 0.625 MS)
Definition bluetooth.h:2572
uint8_t options
Bit-field of scanning options.
Definition bluetooth.h:2530
LE advertisement and scan response packet information.
Definition bluetooth.h:2576
uint16_t interval
Periodic advertising interval (N * 1.25 ms).
Definition bluetooth.h:2619
int8_t tx_power
Transmit power of the advertiser.
Definition bluetooth.h:2592
uint8_t sid
Advertising Set Identifier, valid range BT_GAP_SID_MIN to BT_GAP_SID_MAX.
Definition bluetooth.h:2586
uint8_t primary_phy
Primary advertising channel PHY.
Definition bluetooth.h:2622
int8_t rssi
Strength of advertiser signal.
Definition bluetooth.h:2589
const bt_addr_le_t * addr
Advertiser LE address and type.
Definition bluetooth.h:2583
uint8_t secondary_phy
Secondary advertising channel PHY.
Definition bluetooth.h:2625
uint8_t adv_type
Advertising packet type.
Definition bluetooth.h:2602
uint16_t adv_props
Advertising packet properties bitfield.
Definition bluetooth.h:2612
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.
Macros to abstract toolchain specific capabilities.
Macro utilities.