2024-08-29 23:32:37 +08:00
|
|
|
.. zephyr:code-sample:: ble_scan_adv
|
|
|
|
:name: Scan & Advertise
|
|
|
|
:relevant-api: bt_gap bluetooth
|
2017-04-05 03:06:31 +08:00
|
|
|
|
2024-09-02 15:25:43 +08:00
|
|
|
Combine Bluetooth LE Broadcaster & Observer roles to advertise and scan for devices simultaneously.
|
2017-03-03 19:08:00 +08:00
|
|
|
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
2024-09-02 15:25:43 +08:00
|
|
|
A simple application demonstrating combined Bluetooth LE Broadcaster & Observer
|
2017-03-03 19:08:00 +08:00
|
|
|
role functionality. The application will periodically send out
|
|
|
|
advertising packets with a manufacturer data element. The content of the
|
|
|
|
data is a single byte indicating how many advertising packets the device
|
|
|
|
has received (the number will roll back to 0 after 255).
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
************
|
|
|
|
|
|
|
|
* BlueZ running on the host, or
|
2024-09-02 15:25:43 +08:00
|
|
|
* A board with Bluetooth LE support
|
2017-03-03 19:08:00 +08:00
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
2019-03-09 06:21:37 +08:00
|
|
|
This sample can be found under :zephyr_file:`samples/bluetooth/scan_adv` in the
|
2017-03-03 19:08:00 +08:00
|
|
|
Zephyr tree.
|
|
|
|
|
2024-09-16 16:55:34 +08:00
|
|
|
See :zephyr:code-sample-category:`bluetooth` samples for details.
|