Skip to content

memfault/memfault-nRF9160-relay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memfault nRF9160 Relay Example

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.

Installing dependencies

nRF SDK and Zephyr

Install the necessary system dependencies (this command should work as-is on Ubuntu):

sudo apt install cmake python3 python3-pip python3-venv

Clone the repository:

git clone https://github.com/memfault/memfault-nRF9160-relay.git
cd memfault-nRF9160-relay

Create a virtual environment and install the dependencies:

python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt

All 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-export

Install additional Python dependencies:

pip3 install -r zephyr/scripts/requirements.txt
pip3 install -r nrf/scripts/requirements.txt
pip3 install -r bootloader/mcuboot/scripts/requirements.txt

Compiling and running

Once 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 firmware

Set up the UDP server:

python3 server

Finally, flash the device:

west build -t flash