{"id":28615518,"url":"https://github.com/siliconlabssoftware/devs-bluetooth-aoa-example","last_synced_at":"2025-08-01T20:44:10.903Z","repository":{"id":280807732,"uuid":"887372722","full_name":"SiliconLabsSoftware/devs-bluetooth-aoa-example","owner":"SiliconLabsSoftware","description":"Experimental project for Bluetooth Angle of Arrival application created by Developer Services","archived":false,"fork":false,"pushed_at":"2025-05-27T12:25:02.000Z","size":13068,"stargazers_count":3,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T02:09:18.135Z","etag":null,"topics":["community-contributions-accepted","silicon-labs","silicon-labs-community"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SiliconLabsSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-12T16:23:11.000Z","updated_at":"2025-05-27T12:25:06.000Z","dependencies_parsed_at":"2025-05-07T12:49:27.590Z","dependency_job_id":null,"html_url":"https://github.com/SiliconLabsSoftware/devs-bluetooth-aoa-example","commit_stats":null,"previous_names":["siliconlabssoftware/bluetooth-aoa-example","siliconlabssoftware/devs-bluetooth-aoa-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SiliconLabsSoftware/devs-bluetooth-aoa-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Fdevs-bluetooth-aoa-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Fdevs-bluetooth-aoa-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Fdevs-bluetooth-aoa-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Fdevs-bluetooth-aoa-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SiliconLabsSoftware","download_url":"https://codeload.github.com/SiliconLabsSoftware/devs-bluetooth-aoa-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Fdevs-bluetooth-aoa-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268294379,"owners_count":24227667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community-contributions-accepted","silicon-labs","silicon-labs-community"],"created_at":"2025-06-12T02:09:11.031Z","updated_at":"2025-08-01T20:44:10.870Z","avatar_url":"https://github.com/SiliconLabsSoftware.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angle of Arrival locator project\n- [Angle of Arrival locator project](#angle-of-arrival-locator-project)\n  - [Overview](#overview)\n    - [NCP firmware](#ncp-firmware)\n    - [Host firmware](#host-firmware)\n  - [Hardware requirements](#hardware-requirements)\n  - [Software dependencies](#software-dependencies)\n    - [Build with CMAKE](#build-with-cmake)\n    - [Build with Makefile](#build-with-makefile)\n    - [Build with Docker](#build-with-docker)\n      - [Requirements](#requirements)\n      - [How to build the docker image](#how-to-build-the-docker-image)\n  - [How to use the project](#how-to-use-the-project)\n    - [Network setup](#network-setup)\n    - [MQTT usage](#mqtt-usage)\n  - [Disclaimer](#disclaimer)\n\n## Overview\nThe system contains 2 MCUs an EFR32xG24 (aka host) and an EFR32BG22 antenna array (aka NCP).\nThe NCP will receive the CTE packets (raw I/Q data) and transfers it to the host via UART.\nThe host receives it, processes it and logs it to the standard output.\nData is provided in JSON format and depending on the actual configuration it will be raw I/Q sample or angle information.\nThe angle information is calculated by the host with MVP (Matrix Vector Processor) from the I/Q samples.\n\nIf you are interested in other Bluetooth examples you can find more here:\n[Bluetooth application examples](https://github.com/SiliconLabs/bluetooth_applications)\n\n### NCP firmware\nThis is a simple locator NCP project, only change is that the VCOM is disabled (so the UART line can be used directly).\n\n### Host firmware\nSoftware components:\n - bt\n Bluetooth host sub-system, responsible for CTE data processing.\n Bluetooth specific settings are available in the `**/config folder`.\n All of the files here are part of the Silabs' GSDK except `sl_bt_aoa.c` and `sl_bt_aoa.h`.\n If GSDK update is necessary please update the components (sub-folders) manually from the newer GSDK.\n - drivers\n Custom project specific drivers.\n\n## Hardware requirements\n- 2pcs WSTK board (BRD4001 or BRD4002)\n- 1pc NCP: BG22 antenna array (BRD4185A)\n- 1pc HOST: MG24 host (BRD4187C)\n- Tag(s) using the Silicon Laboratories proprietary CTE.\n  In the test network BRD4187C was used with the SoC asset tag example (\"bt_aoa_soc_asset_tag”).\n\n![Board connections](resources/board_connections.png \"Board connections\")\n\n\n## Software dependencies\nBuild system dependencies for ubuntu 22.04 lts systems:\n - CMake 3.25.4: https://github.com/Kitware/CMake/releases/tag/v3.25.3\n - Ninja\n - arm gcc compiler: arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi\n - Make - optionally if makefiles are used for build\n - Simplicity commander: https://www.silabs.com/documents/login/software/SimplicityCommander-Linux.zip\n\n### Build with CMAKE\nUsage (most modern IDE will natively support this):\n1. Go to the project directory and configure:\n    ```bash\n    cmake \u003cproject_name\u003e_cmake -B build -G \"Ninja\" -DCMAKE_BUILD_TYPE:STRING=\u003cbuild_type\u003e -DCMAKE_TOOLCHAIN_FILE:STRING=toolchain.cmake```\n    `\u003cproject_name\u003e` can be either `locator_host` or `locator_ncp`.\n    `\u003cbuild_type\u003e` can be `Debug` or `Release`.\n    This must be done with a fresh project or when the build recipe changes\n2. Build\n    ```bash\n    cmake --build build --parallel 8 --config \u003cbuild_type\u003e\n    ```\n    `\u003cbuild_type\u003e` can be `Debug` or `Release`, but must be same as in the previous step.\n    This must be invoked when you change a source/header file.\n\n### Build with Makefile\nThis is a wrapper for the CMAKE build.\nTo build every binary you shall run (in the root folder)\n```bash\nmake\n```\nThe following targets are available:\n - `all` (everything below, this is the default)\n - `locator_host`\n - `locator_ncp`\nThe following arguments can be also added:\n - `TARGET`: What shall be the target inside the target. Following options available:\n   - `clean_build`: Will call `clean`, `configure` and `build`. This is the default.\n   - `clean`: Cleans the build directory.\n   - `configure`: Configures CMAKE for the build\n   - `build`: Builds either `locator_host` or `locator_ncp`\n - `TYPE`: What shall be the build configuration either `Debug` or `Release`.\n\nExample (secure release build without flashing):\n```bash\nmake locator_host TARGET=build TYPE=Release\n```\n\nYou can also use the Makefiles in the project directory, only difference that the `TARGET` variable becomes the Makefile target.\nExample:\n```bash\nmake build\n```\n\n### Build with Docker\n\n#### Requirements\nBuild process was tested on Ubuntu 22.04 LTS.\n - Install docker: https://docs.docker.com/engine/install/ubuntu/\n - Post installation steps: https://docs.docker.com/engine/install/linux-postinstall/\n  This is important because the script expects the current user have full docker managing access.\n\n#### How to build the docker image\nAn action workflow already building the SW inside a docker image: [02-Build-Firmware.yml](.github/workflows/02-Build-Firmware.yml)\nYou can follow that and build your docker image on Ubuntu or on Windows with WSL.\n\n## How to use the project\n\nThe demo expects Tag(s) which are using the Silabs proprietary CTE. (The example project name is “bt_aoa_soc_asset_tag”.)\nThe firmware has verbose logging and it will log the MQTT messages to the standard output.\nTo view the debug prints one must use the [RTT viewer](https://www.segger.com/products/debug-probes/j-link/tools/rtt-viewer/).\n\nAfter “OK” the following text shall be present:\n“ Application reset! Reason: 0x3 BT NCP boot! Stack version: 7.0.1 (build 206)\nMAC address (reversed endianness): 60A423C973C3 “\n\nThis means that the Bluetooth host and NCP is initialized.\n\n### Network setup\nIf the MQTT capability of the demo system is required then the following are needed:\n\u003cul\u003e\n  \u003cli\u003eA local network with full access.\u003c/li\u003e\n  \u003cli\u003eA MQTT broker. Mosquito is recommended. It’s easy to set up on a Raspberry PI, steps:\u003c/li\u003e\n   \u003cul\u003e\n     \u003cli\u003e1.Install OS\u003c/li\u003e\n     \u003cli\u003e2. Connect to the internet.\u003c/li\u003e\n     \u003cli\u003e3. sudo apt update \u0026\u0026 sudo apt upgrade\u003c/li\u003e\n     \u003cli\u003e4. sudo apt install -y mosquitto mosquitto-clients\u003c/li\u003e\n     \u003cli\u003e5. sudo systemctl enable mosquitto.service\u003c/li\u003e\n     \u003cli\u003e6. sudo nano /etc/mosquitto/mosquitto.conf\u003c/li\u003e\n     \u003cli\u003e7. Add to the config file: “listener 1883”\u003c/li\u003e\n     \u003cli\u003e8. Add to the config file: “allow_anonymous true”\u003c/li\u003e\n     \u003cli\u003e9. Save and close config file\u003c/li\u003e\n     \u003cli\u003e10. reboot raspberry\u003c/li\u003e\n     \u003cli\u003e11. Check installation success with: “mosquitto -v”\u003c/li\u003e\n   \u003c/ul\u003e\n  \u003cli\u003e A MQTT client (to check the published messages). MQTT Explorer is recommended.\u003c/li\u003e\n\u003c/ul\u003e\nEncryption shall be disabled, password and username shall be left blank, IP must be the raspberry’s IP.\n\n![MQTT Explorer example](resources/mqttt_explorer_example.png \"MQTT explorer example\")\n\n### MQTT usage\n\nThere is a python script under “locator_host/tools/mqtt_forwarder” folder called “main.py”.\nThis can be used to forward the debug output of the host (MG24) to the MQTT broker.\nUsage description can be found at the python script’s folder in the README file.\n\nExample:\n```\n“ locator_host\\tools\\mqtt_forwarder\u003epy main.py --mqttBrokerAddress 192.168.1.32 --serialNo 440311404 ”\n```\nExpected Output:\n```\n“ Connecting to MQTT broker at 192.168.1.32 MQTT Publish!\nTopic: silabs/aoa/angle/60A423C973C3/6C5CB145C7BC\nMessage: {\"azimuth\": -49.86,\"azimuth_stdev\": 4.61,\"elevation\": 17.50,\"elevation_stdev\": 5.30,\n\"distance\": 0.04,\"distance_stdev\": 0.00,\"sequence\": 1} “\n```\n\nIf you’re using MQTT explorer then you should see a similar screen as below.\n![MQTT example](resources/mqttt_explorer_example_2.png \"MQTT example\")\n\n## Disclaimer\nThe Gecko SDK suite supports development with Silicon Labs IoT SoC and module devices. Unless otherwise specified in the specific directory, all examples are considered to be EXPERIMENTAL QUALITY which implies that the code provided in the repos has not been formally tested and is provided as-is. It is not suitable for production environments. In addition, this code will not be maintained and there may be no bug maintenance planned for these resources. Silicon Labs may update projects from time to time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiliconlabssoftware%2Fdevs-bluetooth-aoa-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiliconlabssoftware%2Fdevs-bluetooth-aoa-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiliconlabssoftware%2Fdevs-bluetooth-aoa-example/lists"}