Edge Impulse enables developers to create the next generation of intelligent device solutions with embedded Machine Learning. This repository contains the Edge Impulse firmware for the Nordic Semiconductor nRF91x1DK development boards, in combination with the ST X_NUCLEO-IKS02A1 shield. This combination supports all Edge Impulse device features, including ingestion, remote management and inferencing.
Note: Do you just want to use this development board with Edge Impulse? No need to build this firmware. See these instructions for prebuilt images and instructions, or use the data forwarder to capture data from any sensor.
-
Install the nRF Connect SDK in a separate folder from this repository (e.g.
~/repos/ncs
).Note: This firmware relays on NCS v2.7.0
-
Clone this repository:
$ git clone https://github.com/edgeimpulse/firmware-nordic-nrf91x1dk
-
Build the application:
$ west build -b nrf9161dk/nrf9161/ns # or $ west build -b nrf9151dk/nrf9151/ns
-
Clone this repository:
$ git clone https://github.com/edgeimpulse/firmware-nordic-nrf91x1dk
-
Build the Docker container:
$ docker build -t edge-impulse-nordic .
-
Build the application:
$ docker run --rm -v $PWD:/app edge-impulse-nordic west build -b nrf9161dk/nrf9161/ns # or $ docker run --rm -v $PWD:/app edge-impulse-nordic west build -b nrf9151dk/nrf9151/ns
-
Configure the board:
- Both boards can be configured with Nordic tool nRF Connect for Desktop -> Board Configurator. All information on how this tool works and how to install it can be found in the document page.
- For our application both boards need to have next configuration:
-
Flashing the application:
option 1. Connect the board and power on then copy
build/zephyr/zephyr.bin
to theJLINK
mass storage device. option 2. Connect the board and power on then:$ west flash
- Train a model in Edge Impulse.
- On the Deployment page in the Studio, export as a C++ library.
- Remove the content of
ei-model
directory in this repository. - Extract the downloaded zip with the C++ library into
ei-model
directory. - Rebuild the application.
This firmware is equipped with the Remote Ingestion functionality. It allows you to connect your device to the internet using the LTE connection and start ingesting data remotely from the Edge Impulse Studio!
To build the firmware with the Remote Ingestion, follow the steps above but insted of command:
$ west build -b nrf9161dk/nrf9161/ns
# or
$ west build -b nrf9151dk/nrf9151/ns
Run:
$ west build -b nrf9161dk/nrf9161/ns -- -DEXTRA_CONF_FILE=overlay-remote-ingestion.conf
# or
$ west build -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE=overlay-remote-ingestion.conf
And then:
- Flash the board and connect for the first time to studio.
- Power off the board and insert the SIM card.
Note: Make sure your SIM card is active. You can use the iBasis SIM card shipped with the nRF9161/51DK or any other SIM card that supports LTE-M and/or NB-IoT.
- Be sure that SIM card is enabled in board configuration software (picture above)
- Power on the board and wait for the connection to be established (nRF9160DK will blink LEDs).
- Go to your project in Studio and click on Devices tab, you should see your device with green mark.
-
In case of any issues, the nRF9160DK with Edge Impulse firmware is exposing a serial console on the first UART port (connection parameters 115200bps 8N1). Open the serial port and reset the device to see the boot messages.
-
If you are using the Remote Ingestion functionality and have problems with connection, in the
overlay-remote-ingestion.conf
file change:CONFIG_REMOTE_INGESTION_LOG_LEVEL_WRN=y
to:
CONFIG_REMOTE_INGESTION_LOG_LEVEL_DBG=y
After rebuilding the firmware and flashing, you should see more detailed logs in the serial console.