|
| 1 | +.. zephyr:code-sample:: ble_cs |
| 2 | + :name: Channel Sounding |
| 3 | + :relevant-api: bt_gap bluetooth |
| 4 | + |
| 5 | + Use Channel Sounding functionality. |
| 6 | + |
| 7 | + |
| 8 | +Bluetooth: Channel Sounding |
| 9 | +########################### |
| 10 | + |
| 11 | +Overview |
| 12 | +******** |
| 13 | + |
| 14 | +These samples demonstrates how to use the Bluetooth Channel Sounding feature. |
| 15 | + |
| 16 | +The CS Test sample shows how to us the CS test command to override randomization of certain channel |
| 17 | +sounding parameters, experiment with different configurations, or evaluate the RF medium. It can |
| 18 | +be found under :zephyr_file:`samples/bluetooth/channel_sounding/cs_test`. |
| 19 | + |
| 20 | +The connected CS sample shows how to set up regular channel sounding procedures on a connection |
| 21 | +between two devices. |
| 22 | +It can be found under :zephyr_file:`samples/bluetooth/channel_sounding/connected_cs` |
| 23 | + |
| 24 | +A basic distance estimation algorithm is included in both. |
| 25 | +The Channel Sounding feature does not mandate a specific algorithm for computing distance estimates, |
| 26 | +but the mathematical representation described in [#phase_and_amplitude]_ and [#rtt_packets]_ is used |
| 27 | +as a starting point for these samples. |
| 28 | + |
| 29 | +Distance estimation using channel sounding requires data from two devices, and for that reason |
| 30 | +the channel sounding results in the sample are exchanged in a simple way using a GATT characteristic. |
| 31 | +This limits the amount of data that can be processed at once to about 512 bytes from each device, |
| 32 | +which is enough to estimate distance using a handful of RTT timings and PBR phase samples across |
| 33 | +about 35-40 channels, assuming a single antenna path. |
| 34 | + |
| 35 | +Both samples will perform channel sounding procedures repeatedly and print regular distance estimates to |
| 36 | +the console. They are designed assuming a single subevent per procedure. |
| 37 | + |
| 38 | +Requirements |
| 39 | +************ |
| 40 | + |
| 41 | +* A board with BLE support |
| 42 | +* A controller that supports the Channel Sounding feature |
| 43 | + |
| 44 | +Building and Running |
| 45 | +******************** |
| 46 | + |
| 47 | +These samples can be found under :zephyr_file:`samples/bluetooth/channel_sounding` in |
| 48 | +the Zephyr tree. |
| 49 | + |
| 50 | +See :zephyr:code-sample-category:`bluetooth` samples for details. |
| 51 | + |
| 52 | +References |
| 53 | +********** |
| 54 | + |
| 55 | +.. [#phase_and_amplitude] Bluetooth Core Specification v. 6.0: Vol. 1, Part A, 9.2 |
| 56 | +.. [#rtt_packets] Bluetooth Core Specification v. 6.0: Vol. 1, Part A, 9.3 |
0 commit comments