1.. zephyr:code-sample:: ble_direction_finding_connectionless_rx 2 :name: Direction Finding Periodic Advertising Locator 3 :relevant-api: bt_gap bluetooth 4 5 Implement Bluetooth LE Direction Finding CTE Locator functionality. 6 7Overview 8******** 9 10A simple application demonstrating the Bluetooth LE Direction Finding CTE Locator 11functionality by receiving and sampling sending Constant Tone Extension with 12periodic advertising PDUs. 13 14Requirements 15************ 16 17* Nordic nRF SoC based board with Direction Finding support (example boards: 18 :ref:`nrf52833dk_nrf52833`, :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_connectionless_rx 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_connectionless_rx/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_connectionless_rx/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_connectionless_rx/boards/nrf52833dk_nrf52833.conf` 54 to a new file, 55 :file:`samples/bluetooth/hci_ipc/boards/nrf5340dk_nrf5340_cpunet.conf`. Add 56 the line ``CONFIG_BT_EXT_ADV=y`` to enable extended size of 57 :kconfig:option:`CONFIG_BT_BUF_CMD_TX_SIZE` to support the LE Set Extended Advertising 58 Data command. 59 60Antenna matrix configuration 61**************************** 62 63To use this sample with Angle of Departure enabled on Nordic SoCs, additional 64configuration must be provided via :ref:`devicetree <dt-guide>` to enable 65control of the antenna array. 66 67An example devicetree overlay is in 68:zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.overlay`. 69You can customize this overlay when building for the same board, or create your 70own board-specific overlay in the same directory for a different board. See 71:dtcompatible:`nordic,nrf-radio` for documentation on the properties used in 72this overlay. See :ref:`set-devicetree-overlays` for information on setting up 73and using overlays. 74 75Note that antenna matrix configuration for the nRF5340 SoC is part of the 76network core application. When :zephyr:code-sample:`bluetooth_hci_ipc` is used as the 77network core application, the antenna matrix configuration should be stored in 78the file 79:file:`samples/bluetooth/hci_ipc/boards/nrf5340dk_nrf5340_cpunet.overlay` 80instead. 81