Skip to content

Commit

Permalink
[nrf fromlist] samples: bluetooth: iso: Extend sample documentation
Browse files Browse the repository at this point in the history
Extend the sample documentation for the central and peripheral
iso samples so that they become easier to get started with.

Upstream PR: zephyrproject-rtos/zephyr#68870

Signed-off-by: Rubin Gerritsen <[email protected]>
  • Loading branch information
rugeGerritsen authored and rlubos committed Feb 19, 2024
1 parent b1980ed commit eb59f8d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 11 deletions.
31 changes: 24 additions & 7 deletions samples/bluetooth/central_iso/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,41 @@ Bluetooth: Central ISO
Overview
********

Application demonstrating a connected isochronous channel functional as the
central role, by scanning for peripheral devices and establishing a connection
to the first one with a strong enough signal.
The application then attempts to setup a connected isochronous channel and
starts sending data.
This sample demonstrates how to use an isochronous channel as a central.
The sample scans for a peripheral, establishes a connection, and sets up a connected isochronous channel to it.
Once the isochronous channel is connected, isochronous data is transferred to the peer device every 10 milliseconds.
It is recommended to run this sample together with the :ref:`Bluetooth: Peripheral ISO <peripheral_iso>` sample.

To run the sample with an encrypted isochronous channel, enable :kconfig:option:`CONFIG_BT_SMP`.

Requirements
************

* BlueZ running on the host, or
* A board with Bluetooth Low Energy 5.2 support
* A Bluetooth Controller and board that supports setting
CONFIG_BT_CTLR_CENTRAL_ISO=y
:kconfig:option:`CONFIG_BT_CTLR_CENTRAL_ISO`.

Building and Running
********************
This sample can be found under :zephyr_file:`samples/bluetooth/central_iso` in
the Zephyr tree.

See :ref:`bluetooth samples section <bluetooth-samples>` for details.
1. Start the application.
In the terminal window, check that it is scanning for other devices.

Bluetooth initialized
Scanning successfully started
Device found: D3:3A:5D:F5:73:33 (random) (RSSI -78)
Device found: 70:7B:F4:2B:76:AD (random) (RSSI -68)
Device found: 65:CF:20:0D:CB:9D (random) (RSSI -82)

2. Observe that the device connects.

Connected: 65:CF:20:0D:CB:9D (random)

3. Observe that the ISO channel is connected

ISO Channel 0x200048f8 connected

See :ref:`bluetooth samples section <bluetooth-samples>` for more details.
48 changes: 44 additions & 4 deletions samples/bluetooth/peripheral_iso/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Bluetooth: Peripheral ISO
Overview
********

Similar to the :ref:`Peripheral <ble_peripheral>` sample, except that this application enables
support for connected isochronous (ISO) channels.

This sample demonstrates how to use isochronous channels as a peripheral.
The sample starts advertising, waits for a central to connect to it and set up an isochronous channel.
Once the isochronous channel is set up, received isochronous data is printed out.
It is recommended to run this sample together with the :ref:`Bluetooth: Central ISO <bluetooth_central_iso>` sample.

Requirements
************
Expand All @@ -23,4 +24,43 @@ Building and Running

This sample can be found under :zephyr_file:`samples/bluetooth/peripheral_iso` in the Zephyr tree.

See :ref:`bluetooth samples section <bluetooth-samples>` for details.
1. Start the application.
In the terminal window, check that it is advertising.

Bluetooth initialized
Advertising successfully started

2. Observe that the central device connects and sets up an isochronous channel.

Connected E8:DC:8D:B3:47:69 (random)
Incoming request from 0x20002260
ISO Channel 0x20000698 connected

3. Observe that incoming data is printed.

Incoming data channel 0x20000698 len 1
00
Incoming data channel 0x20000698 len 2
0001
Incoming data channel 0x20000698 len 3
000102
Incoming data channel 0x20000698 len 4
00010203
Incoming data channel 0x20000698 len 5
0001020304
Incoming data channel 0x20000698 len 6
000102030405
Incoming data channel 0x20000698 len 7
000102...040506
Incoming data channel 0x20000698 len 8
000102...050607
Incoming data channel 0x20000698 len 9
000102...060708
Incoming data channel 0x20000698 len 10
000102...070809
Incoming data channel 0x20000698 len 11
000102...08090a
Incoming data channel 0x20000698 len 12
000102...090a0b

See :ref:`bluetooth samples section <bluetooth-samples>` for more details.

0 comments on commit eb59f8d

Please sign in to comment.