This example builds upon the nRF9160 UDP example by Nordic Semiconductor. It shows how a server that receives UDP packets might relay them to the Memfault servers.
This example uses v1.6.0-rc2 of the nRF SDK.
Install the necessary system dependencies (this command should work as-is on Ubuntu):
sudo apt install cmake python3 python3-pip python3-venvClone the repository:
git clone https://github.com/memfault/memfault-nRF9160-relay.git
cd memfault-nRF9160-relayCreate a virtual environment and install the dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txtAll the steps starting from here mimic Nordic's instructions.
Install nRF SDK dependencies:
west init -m https://github.com/nrfconnect/sdk-nrf --mr v1.6.0-rc2
west config manifest.path firmware
west update
west zephyr-exportInstall additional Python dependencies:
pip3 install -r zephyr/scripts/requirements.txt
pip3 install -r nrf/scripts/requirements.txt
pip3 install -r bootloader/mcuboot/scripts/requirements.txtOnce you've installed all the dependencies, make sure to set your Project Key and a static IP address to your UDP server in firmware/prj.conf:
CONFIG_UDP_SERVER_ADDRESS_STATIC="18.188.13.221"
CONFIG_MEMFAULT_NCS_PROJECT_KEY="owTDJvKithvuHTNj47hwmzUOsQ2qEGbG"
Run this in this repository's root:
west build -b=nrf9160dk_nrf9160ns firmwareSet up the UDP server:
python3 serverFinally, flash the device:
west build -t flash