• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/29-Dec-2025-1,4901,171

CMakeLists.txtD29-Dec-2025344 1913

README.rstD29-Dec-20255.7 KiB11697

prj.confD29-Dec-2025359 1814

sample.yamlD29-Dec-2025295 1110

README.rst

1.. zephyr:code-sample:: bluetooth_isochronous_connected_benchmark
2   :name: Isochronous Connected Channels Benchmark
3   :relevant-api: bt_iso bluetooth
4
5   Measure packet loss and sync loss in connected ISO channels.
6
7The ISO Connected Channels Benchmark sample measures and reports packet loss
8and sync loss in connected ISO channels.
9
10Overview
11********
12
13The sample transmits data between the *central* and the *peripheral*
14and measures the quality of the ISO channels.
15
16The application can be used as both a central and a peripheral, and the mode
17can easily be changed.
18
19Requirements
20************
21
22* BlueZ running on the host, or
23* A board with Bluetooth Low Energy 5.2 support
24* A Bluetooth Controller and board that supports setting
25  CONFIG_BT_CTLR_CENTRAL_ISO=y
26* A remote board running the same sample as the reversed role that supports
27  setting CONFIG_BT_CTLR_PERIPHERAL_ISO=y
28
29Building and running
30********************
31
32See :zephyr:code-sample-category:`bluetooth` samples for details.
33
34
35Testing
36=======
37
38After programming the sample to both boards, test it by performing the following
39steps:
40
411. Connect to both boards with a terminal emulator (for example, PuTTY or
42   minicom).
43#. Reset both boards.
44#. In one of the terminal emulators, type "c" to start the application on the
45   connected board in the central role.
46#. In the other terminal emulator, type "p" to start the application in the
47   peripheral role.
48#. Optionally modify the central ISO settings using the console.
49#. Observe that the central and the peripheral connects.
50#. Observe the receive statistics on the devices (the connected ISO channels may
51   by uni- or bidirectional).
52
53Sample output
54==============
55The peripheral will output overall data (since boot),
56current connection (since the CIG was connected) and latest 1000 received
57packets::
58
59  *** Booting Zephyr OS build zephyr-v2.5.0-4098-gdcaaee6db2f5  ***
60   [00:00:00.392,333] <inf> iso_connected: Starting Bluetooth Throughput example
61   [00:00:00.405,395] <inf> iso_connected: Bluetooth initialized
62   Choose device role - type c (central role) or p (peripheral role), or q to quit: p
63   Peripheral role
64   [00:00:10.281,555] <inf> iso_connected: Registering ISO server
65   [00:00:10.281,555] <inf> iso_connected: Starting advertising
66   [00:00:10.282,684] <inf> iso_connected: Waiting for ACL connection
67   [00:00:16.711,517] <inf> iso_connected: Connected: FA:4C:4B:DB:D3:89 (public)
68   [00:00:16.711,669] <inf> iso_connected: Waiting for ISO connection
69   [00:00:16.802,856] <inf> iso_connected: Incoming ISO request
70   [00:00:16.802,856] <inf> iso_connected: Returning instance 0
71   [00:00:17.016,845] <inf> iso_connected: ISO Channel 0x20002934 connected
72   [00:00:17.769,439] <inf> iso_connected: Sending value 100
73   [00:00:17.774,902] <inf> iso_connected: Overall     : Received 100/100 (100.00%) - Total packets lost 0
74   [00:00:17.774,932] <inf> iso_connected: Current Conn: Received 100/100 (100.00%) - Total packets lost 0
75   [00:00:17.774,963] <inf> iso_connected: Latest 1000 : Received 100/100 (100.00%) - Total packets lost 0
76   [00:00:17.774,963] <inf> iso_connected:
77   [00:00:18.529,510] <inf> iso_connected: Sending value 200
78   [00:00:18.532,409] <inf> iso_connected: Overall     : Received 200/200 (100.00%) - Total packets lost 0
79   [00:00:18.532,470] <inf> iso_connected: Current Conn: Received 200/200 (100.00%) - Total packets lost 0
80   [00:00:18.532,501] <inf> iso_connected: Latest 1000 : Received 200/200 (100.00%) - Total packets lost 0
81
82
83The central will ask if any changes to the current settings are wanted.
84If y/Y is chosen, then it will create a prompt to changes the settings,
85otherwise continue with the current settings. The central will then start
86scanning for and connecting to a peer device running the sample as peripheral
87role. Once connected, the central will output overall data (since boot),
88current connection (since the CIG was connected) and latest 1000 received
89packets::
90
91   *** Booting Zephyr OS build zephyr-v2.5.0-4098-gdcaaee6db2f5  ***
92   [00:00:00.459,869] <inf> iso_connected: Starting Bluetooth Throughput example
93   [00:00:00.472,961] <inf> iso_connected: Bluetooth initialized
94   Choose device role - type c (central role) or p (peripheral role), or q to quit: c
95   Central role
96   Change ISO settings (y/N)?
97   [00:00:03.277,893] <inf> iso_connected: Scan started
98   [00:00:03.277,893] <inf> iso_connected: Waiting for advertiser
99   [00:00:03.899,963] <inf> iso_connected: Found peripheral with address F4:5A:12:BF:4F:2C (public) (RSSI -24)
100   [00:00:03.900,024] <inf> iso_connected: Stopping scan
101   [00:00:03.908,020] <inf> iso_connected: Scan stopped
102   [00:00:03.908,020] <inf> iso_connected: Connecting
103   [00:00:04.007,232] <inf> iso_connected: Connected: F4:5A:12:BF:4F:2C (public)
104   [00:00:04.007,354] <inf> iso_connected: Binding ISO
105   [00:00:04.007,812] <inf> iso_connected: Connecting ISO channels
106   [00:00:04.312,744] <inf> iso_connected: ISO Channel 0x20002934 connected
107   [00:00:05.065,368] <inf> iso_connected: Sending value 100
108   [00:00:05.072,052] <inf> iso_connected: Overall     : Received 100/100 (100.00%) - Total packets lost 0
109   [00:00:05.072,113] <inf> iso_connected: Current Conn: Received 100/100 (100.00%) - Total packets lost 0
110   [00:00:05.072,143] <inf> iso_connected: Latest 1000 : Received 100/100 (100.00%) - Total packets lost 0
111   [00:00:05.072,143] <inf> iso_connected:
112   [00:00:05.825,439] <inf> iso_connected: Sending value 200
113   [00:00:05.829,589] <inf> iso_connected: Overall     : Received 200/200 (100.00%) - Total packets lost 0
114   [00:00:05.829,620] <inf> iso_connected: Current Conn: Received 200/200 (100.00%) - Total packets lost 0
115   [00:00:05.829,650] <inf> iso_connected: Latest 1000 : Received 200/200 (100.00%) - Total packets lost 0
116