Bluetooth: Channel Sounding Reflector with Inline PCT Transfer
This sample demonstrates how to use the Bluetooth® Channel Sounding (CS) Inline Phase Correction Term Transfer (IPT) feature as a CS reflector, to achieve fast and efficient distance estimation.
Requirements
The sample supports the following development kits:
Hardware platforms |
PCA |
Board name |
|
|---|---|---|---|
nRF54LV10 DK |
PCA10188 |
|
|
PCA10184 |
|
||
nRF54LC10 DK |
PCA10226 |
nrf54lc10dk |
|
PCA10156 |
|
||
PCA10156 |
|
||
PCA10156 |
|
The sample also requires a device running the Bluetooth: Channel Sounding Initiator with Inline PCT Transfer sample.
Overview
The sample acts as a Bluetooth Low Energy Peripheral and Channel Sounding reflector. After startup, it performs the following steps:
Starts connectable advertising using its name (
Nordic CS IPT Reflector), which the Bluetooth: Channel Sounding Initiator with Inline PCT Transfer sample scans for.Waits for a central device to connect.
Configures the CS default settings to enable the reflector role.
The connected central device performs the rest of the CS setup. The central device is responsible for enabling CS IPT in the CS configuration.
Participates in the continuous CS procedures started by the central device.
The sample does not expose any ranging data to the initiator over GATT. Instead, its contribution to the measurement is encoded directly in the phase of the tones it transmits as a CS reflector using the CS IPT feature during the CS procedures.
How CS IPT works
CS IPT exploits the symmetry of CS Phase-Based Ranging (PBR) tones. PBR tones are exchanged in mode 2 steps and in the PBR portion of mode 3 steps, and CS IPT is applicable to both. During a PBR tone exchange the initiator and the reflector each transmit a continuous-wave tone on the same frequency, back-to-back. With CS IPT enabled, the reflector adjusts the phase of the tone it transmits to the initiator to match the phase of the tone it just received from the initiator on the same frequency.
As a result, the phase that the initiator measures on the received tone already contains the sum of the following components:
The phase measured by the reflector on the initiator’s tone.
The phase accumulated on the return trip from the reflector to the initiator.
With CS IPT, the initiator therefore has everything it needs to compute a distance estimate from its local subevent data alone, and the reflector’s phase measurements do not have to be relayed back over the ACL.
This sample only uses mode 2 steps, but the CS IPT feature also applies to the PBR tones within mode 3 steps.
Note
The CS IPT feature only works for distance estimating using PBR. So if you want an RTT measurement from a mode 3 step you still need to use Ranging Service, or an equivalent, to relay the RTT measurement back from the peer device over the ACL.
Benefits of CS IPT
Compared to using the Ranging Service (RAS) to transfer ranging data, CS IPT provides the following benefits:
Reduced setup time for Channel Sounding, since no GATT Ranging Service discovery or subscription is required before distance estimates can be produced.
Higher achievable update rate for distance estimates based on CS procedures, because the reflector’s measurement data is already encoded in the tones the initiator receives and does not need a separate GATT transfer.
Reduced latency between the measurements being taken during a CS procedure and the distance estimate being computed, because the reflector’s measurement data is already encoded in the tones the initiator receives.
Lower power consumption and reduced memory usage on both devices, since the reflector’s measurement data does not have to be buffered on the reflector, sent over the ACL, or reassembled on the initiator.
Drawbacks of CS IPT
Compared to using RAS, CS IPT has the following drawbacks:
Reduced security level. This sample only runs CS mode 2 steps, so it cannot provide the same level of protection against ranging attacks as a RAS-based setup that combines mode 1 (RTT) and mode 2 (PBR) steps.
User interface
The sample does not require user input. The first LED on the development kit will be lit when a connection has been established.
Building and running
This sample can be found under samples/bluetooth/channel_sounding/ipt_reflector in the nRF Connect SDK folder structure.
To build the sample, follow the instructions in Building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.
Note
When building repository applications in the SDK repositories, building with sysbuild is enabled by default.
If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild parameter to every build command or configure west to always use it.
Testing
After programming the sample to your development kit, test it together with a device programmed with the Bluetooth: Channel Sounding Initiator with Inline PCT Transfer sample.
Connect to the kit that runs this sample with a terminal emulator (for example, the Serial Terminal app). See Testing and optimization for the required settings and steps.
Reset both kits.
The reflector starts advertising and the initiator scans for
Nordic CS IPT Reflector. Once the initiator connects, check the reflector terminal for information similar to the following:*** Booting nRF Connect SDK v3.2.99-09f8a95ee5b4 *** *** Using Zephyr OS v4.3.99-2925b3840984 *** I: Starting Channel Sounding IPT Reflector Sample I: SoftDevice Controller build revision: I: 36 9c e5 98 e5 71 0a a0 |6....q.. I: 2d b9 89 96 6b 15 65 4b |-...k.eK I: d6 e8 4a ac |..J. I: HW Platform: Nordic Semiconductor (0x0002) I: HW Variant: nRF54Lx (0x0005) I: Firmware: Standard Bluetooth controller (0x00) Version 54.58780 Build 175236504 I: HCI transport: SDC I: Identity: D2:CE:07:7E:40:79 (random) I: HCI: version 6.2 (0x10) revision 0x30a9, manufacturer 0x0059 I: LMP: version 6.2 (0x10) subver 0x30a9 I: Connected to E6:BA:C9:31:51:DB (random) (err 0x00) I: CS capability exchange completed. I: CS config creation complete. - id: 0 - mode: 2 (PBR) - min_main_mode_steps: 0 - max_main_mode_steps: 0 - main_mode_repetition: 0 - mode_0_steps: 3 - role: Reflector - rtt_type: AA only - cs_sync_phy: LE 1M PHY - channel_map_repetition: 1 - channel_selection_type: Algorithm #3b - ch3c_shape: Hat shape - ch3c_jump: 0 - t_ip1_time_us: 30 - t_ip2_time_us: 20 - t_fcs_time_us: 60 - t_pm_time_us: 10 - channel_map: 0x1FFFFFFFFFFFFC7FFFFC I: CS security enabled. I: CS procedures enabled: - config ID: 0 - antenna configuration index: 0 - TX power: 0 dbm - subevent length: 7500 us - subevents per event: 1 - subevent interval: 0 - event interval: 3 - procedure interval: 2 - procedure count: 0 - maximum procedure length: 12
Dependencies
This sample uses the following nRF Connect SDK libraries:
This sample uses the following Zephyr libraries:
-
include/logging/log.h
include/zephyr/types.h-
include/kernel.h
API:
include/bluetooth/bluetooth.hinclude/bluetooth/conn.hinclude/bluetooth/uuid.hinclude/bluetooth/cs.h