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