Skip to content

Commit aa690fa

Browse files
manoj-aerlynckartben
authored andcommitted
doc: samples: Update bluetooth/central README
Add relevant details to README file of samples/bluetooth/central Signed-off-by: Manojkumar Konisetty <[email protected]>
1 parent b601a35 commit aa690fa

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

samples/bluetooth/central/README.rst

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,60 @@
22
:name: Central
33
:relevant-api: bluetooth
44

5-
Implement basic Bluetooth LE Central role functionality (scanning and connecting).
5+
Implement basic Bluetooth LE Central role functionality
6+
(scanning and connecting).
67

78
Overview
89
********
910

10-
Application demonstrating very basic Bluetooth LE Central role functionality by scanning
11-
for other Bluetooth LE devices and establishing a connection to the first one with a
12-
strong enough signal.
11+
This application demonstrates basic Bluetooth LE Central role functionality
12+
by scanning for other Bluetooth LE devices and establishing a connection
13+
to the first one with a strong enough signal.
14+
15+
Core features
16+
*************
17+
18+
Scanning for devices
19+
====================
20+
21+
The application initiates a passive scan to detect nearby Bluetooth LE devices.
22+
It specifically looks for devices that have a signal strength greater
23+
than -50dBm. This threshold helps the app filter out weaker signals,
24+
ensuring it only interacts with devices that are within a reasonable RSSI
25+
range for communication.
26+
27+
Connection handling
28+
===================
29+
30+
1. The Central scans for Peripheral devices and if it finds a Peripheral
31+
which has a signal strength higher than -50dBm, an attempt to establish
32+
LE connection is made.
33+
2. If the connection is successful, the Central initiates disconnect to
34+
the Peripheral and then restarts the scan.
35+
3. If there are no connections, the Central keeps scanning continuously.
36+
37+
The sample is used to demonstrate the Central mode capabilities of Bluetooth LE and
38+
hence a disconnect is issued right immediately after establishing a connection with
39+
a Peripheral, allowing the Central to resume scanning for other devices.
1340

1441
Requirements
1542
************
1643

1744
* BlueZ running on the host, or
1845
* A board with Bluetooth LE support
1946

20-
Building and Running
47+
Building and running
2148
********************
22-
This sample can be found under :zephyr_file:`samples/bluetooth/central` in the
23-
Zephyr tree.
2449

25-
See :zephyr:code-sample-category:`bluetooth` samples for details.
50+
Build and flash the sample as follows, replacing board_name with your
51+
target board:
52+
53+
.. zephyr-app-commands::
54+
:zephyr-app: samples/bluetooth/central
55+
:board: board_name
56+
:goals: build flash
57+
:compact:
58+
59+
To test Central's scanning functionality, either flash the :zephyr:code-sample:`ble_peripheral`
60+
sample on a second compatible board or use an off-the-shelf Bluetooth LE enabled
61+
device that can act as a Peripheral (eg. smartphone, smartwatch, etc.).

0 commit comments

Comments
 (0)