1.. _bluetooth_direction_finding_connectionless_rx:
2
3Bluetooth: Direction Finding Periodic Advertising Locator
4#########################################################
5
6Overview
7********
8
9A simple application demonstrating the BLE Direction Finding CTE Locator
10functionality by receiving and sampling sending Constant Tone Extension with
11periodic advertising PDUs.
12
13Requirements
14************
15
16* Nordic nRF SoC based board with Direction Finding support (example boards:
17  :ref:`nrf52833dk_nrf52833`, :ref:`nrf5340dk_nrf5340`)
18* Antenna matrix for AoA (optional)
19
20Check your SoC's product specification for Direction Finding support if you are
21unsure.
22
23Building and Running
24********************
25
26By default the application supports Angle of Arrival and Angle of Departure mode.
27
28To use Angle of Departure mode only, build this application as follows,
29changing ``nrf52833dk_nrf52833`` as needed for your board:
30
31.. zephyr-app-commands::
32   :zephyr-app: samples/bluetooth/direction_finding_connectionless_rx
33   :host-os: unix
34   :board: nrf52833dk_nrf52833
35   :gen-args: -DOVERLAY_CONFIG=overlay-aod.conf
36   :goals: build flash
37   :compact:
38
39To run the application on nRF5340DK, a Bluetooth controller application must
40also run on the network core. The :ref:`bluetooth-hci-rpmsg-sample` sample
41application may be used. To build this sample with direction finding support
42enabled:
43
44* Copy
45  :zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.overlay`
46  to a new file,
47  :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
48* Copy
49  :zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.conf`
50  to a new file,
51  :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.conf`. Add
52  the line ``CONFIG_BT_EXT_ADV=y`` to enable extended size of
53  :kconfig:`CONFIG_BT_BUF_CMD_TX_SIZE` to support the LE Set Extended Advertising
54  Data command.
55
56Antenna matrix configuration
57****************************
58
59To use this sample with Angle of Departure enabled on Nordic SoCs, additional
60configuration must be provided via :ref:`devicetree <dt-guide>` to enable
61control of the antenna array.
62
63An example devicetree overlay is in
64:zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.overlay`.
65You can customize this overlay when building for the same board, or create your
66own board-specific overlay in the same directory for a different board. See
67:dtcompatible:`nordic,nrf-radio` for documentation on the properties used in
68this overlay. See :ref:`set-devicetree-overlays` for information on setting up
69and using overlays.
70
71Note that antenna matrix configuration for the nRF5340 SoC is part of the
72network core application. When :ref:`bluetooth-hci-rpmsg-sample` is used as the
73network core application, the antenna matrix configuration should be stored in
74the file
75:file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`
76instead.
77