README.rst
1.. zephyr:code-sample:: bluetooth_direction_finding_central
2 :name: Direction Finding Central
3 :relevant-api: bluetooth
4
5 Connect to a Bluetooth LE Direction Finding peripheral and request Constant Tone Extension.
6
7Overview
8********
9
10A simple application demonstrating the Bluetooth LE Direction Finding CTE reception in
11connected mode by requesting transmission of a packet containing Constant
12Tone Extension by connected peer device.
13
14Requirements
15************
16
17* Nordic nRF SoC based board with Direction Finding support (example boards:
18 :ref:`nrf52833dk_nrf52833`, :ref:`nrf52833dk_nrf52820`, :ref:`nrf5340dk_nrf5340`)
19* Antenna matrix for AoA (optional)
20
21Check your SoC's product specification for Direction Finding support if you are
22unsure.
23
24Building and Running
25********************
26
27By default the application supports Angle of Arrival and Angle of Departure mode.
28
29To use Angle of Departure mode only, build this application as follows,
30changing ``nrf52833dk/nrf52833`` as needed for your board:
31
32.. zephyr-app-commands::
33 :zephyr-app: samples/bluetooth/direction_finding_central
34 :host-os: unix
35 :board: nrf52833dk/nrf52833
36 :gen-args: -DEXTRA_CONF_FILE=overlay-aod.conf
37 :goals: build flash
38 :compact:
39
40To run the application on nRF5340DK, a Bluetooth controller application must
41also run on the network core. The :zephyr:code-sample:`bluetooth_hci_ipc` sample
42application may be used. To build this sample with direction finding support
43enabled:
44
45* Copy
46 :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.overlay`
47 to a new file,
48 :file:`samples/bluetooth/hci_ipc/boards/nrf5340dk_nrf5340_cpunet.overlay`.
49* Make sure the same GPIO pins are assigned to Direction Finding Extension in file
50 :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf5340dk_nrf5340_cpuapp.overlay`.
51 as those in the created file :file:`samples/bluetooth/hci_ipc/boards/nrf5340dk_nrf5340_cpunet.overlay`.
52* Copy
53 :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf`
54 to a new file,
55 :file:`samples/bluetooth/hci_ipc/boards/nrf5340dk_nrf5340_cpunet.conf`.
56
57Antenna matrix configuration
58****************************
59
60To use this sample with Angle of Arrival enabled on Nordic SoCs, additional
61configuration must be provided via :ref:`devicetree <dt-guide>` to enable
62control of the antenna array.
63
64An example devicetree overlay is in
65:zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.overlay`.
66You can customize this overlay when building for the same board, or create your
67own board-specific overlay in the same directory for a different board. See
68:dtcompatible:`nordic,nrf-radio` for documentation on the properties used in
69this overlay. See :ref:`set-devicetree-overlays` for information on setting up
70and using overlays.
71
72Note that antenna matrix configuration for the nRF5340 SoC is part of the
73network core application. When :zephyr:code-sample:`bluetooth_hci_ipc` is used as the
74network core application, the antenna matrix configuration should be stored in
75the file
76:file:`samples/bluetooth/hci_ipc/boards/nrf5340dk_nrf5340_cpunet.overlay`
77instead.
78