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 Thingy91 development board. 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 the instructions for the Thingy:91 for a prebuilt image 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
).
Clone this repository:
$ git clone https://github.com/edgeimpulse/firmware-nordic-thingy91
(optional) Build the connectivity bridge
:
Note: If your Thingy:91 is not registering two serial ports after connecting to PC through Micro USB cable, then you have to flash the
connectivty bridge
firmware. Otherwise, go to the next step.
$ cd connectivity_bridge/
$ west build -b thingy91_nrf52840
Go back to the firmware-nordic-thingy91
directory (don't run this command from the connectivity_bridge
folder).
Build the application:
$ west build -b thingy91_nrf9160_ns
Clone this repository:
$ git clone https://github.com/edgeimpulse/firmware-nordic-thingy91
Build the Docker container:
$ docker build -t edge-impulse-nordic .
(optional) Build the connectivity_bridge
:
Note: If your Thingy:91 is not registering two serial ports after connecting to PC through Micro USB cable, then you have to flash the
connectivty bridge
firmware. Otherwise, go to the next step.
$ docker run --rm -v $PWD:/app -w /app/connectivity_bridge edge-impulse-nordic west build -b thingy91_nrf52840
Build the application:
$ docker run --rm -v $PWD:/app edge-impulse-nordic-thingy91 west build -b thingy91_nrf9160_ns
(optional) To flash the connectivity bridge
follow this guide and use the file: connectivity_bridge/build/zephyr/app_signed.hex
.
To flash the application follow this guide and use the file build/zephyr/app_signed.hex
.
That's it. You can now connect to the device through the Edge Impulse CLI or through WebUSB, as described here.
ei-model
directory in this repository.ei-model
directory.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 thingy91_nrf9160_ns
Run:
west build -b thingy91_nrf9160_ns -- -DEXTRA_CONF_FILE=overlay-remote-ingestion.conf
And then:
Note: Make sure your SIM card is active. You can use the iBasis SIM card shipped with the Thingy:91 or any other SIM card that supports LTE-M and/or NB-IoT.
In case of any issues, the Thingy:91 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.
Remember that device configuration is stored in the nRF9160 SoC Flash, so after every flashing your device is loosing API KEY and other settings. You have to connect the device to Edge Impulse through edge-impulse-daemon
once again to restore the configuration.