mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 00:42:22 +00:00
In order to bring consistency in-tree, migrate all samples to the use the new prefix <zephyr/...>. Note that the conversion has been scripted: ```python from pathlib import Path import re EXTENSIONS = ("c", "h", "cpp", "rst") for p in Path(".").glob("samples/**/*"): if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS: continue content = "" with open(p) as f: for line in f: m = re.match(r"^(.*)#include <(.*)>(.*)$", line) if (m and not m.group(2).startswith("zephyr/") and (Path(".") / "include" / "zephyr" / m.group(2)).exists()): content += ( m.group(1) + "#include <zephyr/" + m.group(2) +">" + m.group(3) + "\n" ) else: content += line with open(p, "w") as f: f.write(content) ``` Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no> |
||
---|---|---|
.. | ||
boards | ||
src | ||
CMakeLists.txt | ||
overlay-aod.conf | ||
prj.conf | ||
README.rst | ||
sample.yaml |
.. _bluetooth_direction_finding_central: Bluetooth: Direction Finding Central #################################### Overview ******** A simple application demonstrating the BLE Direction Finding CTE reception in connected mode by requesting transmission of a packet containing Constant Tone Extension by connected peer device. Requirements ************ * Nordic nRF SoC based board with Direction Finding support (example boards: :ref:`nrf52833dk_nrf52833`, :ref:`nrf52833dk_nrf52820`, :ref:`nrf5340dk_nrf5340`) * Antenna matrix for AoA (optional) Check your SoC's product specification for Direction Finding support if you are unsure. Building and Running ******************** By default the application supports Angle of Arrival and Angle of Departure mode. To use Angle of Departure mode only, build this application as follows, changing ``nrf52833dk_nrf52833`` as needed for your board: .. zephyr-app-commands:: :zephyr-app: samples/bluetooth/direction_finding_central :host-os: unix :board: nrf52833dk_nrf52833 :gen-args: -DOVERLAY_CONFIG=overlay-aod.conf :goals: build flash :compact: To run the application on nRF5340DK, a Bluetooth controller application must also run on the network core. The :ref:`bluetooth-hci-rpmsg-sample` sample application may be used. To build this sample with direction finding support enabled: * Copy :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.overlay` to a new file, :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`. * Make sure the same GPIO pins are assigned to Direction Finding Extension in file :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf5340dk_nrf5340_cpuapp.overlay`. as those in the created file :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`. * Copy :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf` to a new file, :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.conf`. Antenna matrix configuration **************************** To use this sample with Angle of Arrival enabled on Nordic SoCs, additional configuration must be provided via :ref:`devicetree <dt-guide>` to enable control of the antenna array. An example devicetree overlay is in :zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.overlay`. You can customize this overlay when building for the same board, or create your own board-specific overlay in the same directory for a different board. See :dtcompatible:`nordic,nrf-radio` for documentation on the properties used in this overlay. See :ref:`set-devicetree-overlays` for information on setting up and using overlays. Note that antenna matrix configuration for the nRF5340 SoC is part of the network core application. When :ref:`bluetooth-hci-rpmsg-sample` is used as the network core application, the antenna matrix configuration should be stored in the file :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay` instead.