Skip to content

Getting started

Geovane Fedrecheski edited this page Sep 12, 2025 · 9 revisions

Running a Mari network on your computer

Hardware requirements:

  • a Computer

  • nRF5340 → the gateway

  • nRF52840 → the node

  • USB cables to connect the nRFs to your computer

1- Install dependency packages

The source code of the different applications available in this repository can be built using SEGGER Embedded Studio for ARM. In SEGGER embedded studio, use the package manager (available in menu Tools > Package manager) to install the CMSIS 5 CMSIS-CORE,CMSIS 5 CMSIS-DSP and nRF packages.

For details on SEGGER Embedded Studio, read the online documentation.

You should see these packages in Tools > Show Installed Packages.

Screenshot from 2025-08-14 17-44-53

2- Install the repository

Clone or download this repository on your computer.

3- Setting up the gateway

1- Connect the gateway to your computer using USB Cable and turn it on

2- Flash the app project:

  • Open mari/mari-gateway-app-nrf5340dk.emProject in segger

  • Double click on the project 03app_gateway_app to make it active

  • Connect the gateway using Target > connect j-link

  • Flash the project using target > download 03app_gateway_app

3- Flash the net project:

  • Open mari/mari-gateway-net-nrf5340dk.emProject in segger

  • If you have an assigned network id:

    In main.c, change this line to

    #define MARI_APP_NET_ID MARI_NET_ID_DEFAULT

    to

    #define MARI_APP_NET_ID your_assigned_net_id

    else pass this step

  • Double click on the project 03app_gateway_net to make it active

  • Connect the gateway using Target > connect j-link

  • Flash the project using target > download 03app_gateway_net

4- Setting up the nodes

1- Connect the node to your computer using USB Cable and turn it on

2- Flash the node project:

  • Open mari/mari-node-nrf52840dk.emProject in segger

  • If you have an assigned network id:

    In main.c, change this line to

    #define MARI_APP_NET_ID MARI_NET_ID_DEFAULT

    to

    #define MARI_APP_NET_ID your_assigned_net_id

    else pass this step

  • Double click on the project 03app_node to make it active

  • Connect the gateway using Target > connect j-link

  • Flash the project using target > download 03app_node

Checking connection:

  • To know if the node is connected, check led 4, it should be on,

    led 1 on: node still not connected to gateway, listening but not joining

    led 2 on: node is synced with the gateway

    led 3 on: after syncing, the node is joining: it is sending a join request and waiting for a join response from the gateway

  • If you run in debug mode, you should see these messages indicating that the node is successfully connected to the gateway

Screenshot from 2025-08-14 17-29-46

Note:

  • When you want to debug and have multiple nRFs connected to your computer, you will get a window like this to choose the nRF
Screenshot from 2025-08-14 17-34-07

Check the sticker in the middle of your nRF it will have a number that should match one of those in S/N.