RAK811 example

This example application runs out of the box on the RAK811 family of microncontrollers. The RAK811 is based on a STM32L151 and a Semtech Sx1276 radio.

The random number generator used in this example is vulnerable to tampering if a user knows the oscillator frequency of the chip. The STM32L1 does not have an on-board random number generator peripheral.

Prerequisites

Hardware

Verified on the out-of-production RAK811 Tracker Node, which has been replaced by:

All boards with the RAK811 chip should function, but may have different capabilities in on board perpiheral support.

Software

To build and flash the example, you need to have rustup. In practice you can use whatever tool you want to flash the device, but this guide will assume that probe-run is used (cargo install probe-run).

Configuring

Over The Air Authentication (OTAA) credentials will come from these entries in ~/.drogue/config.toml:

"dev-eui" = "..."
"app-eui" = "..."
"app-key" = "..."

Building

cargo build --release

Flashing

Flashing the firmware uses probe-run which auto-detects the probe connected to your device. The following command will build and flash the firmware and open the debugger console so you can see the console debug output.

cargo run --release

If you’re experiencing problems, try setting the VID:PID values to that of your probe (you can find that from lsusb once your board is powered).

cargo run --release -- --probe <VID>:<PID>

Usage

Once the device is flashed, it will connect to the local LoRaWAN network. Once the network is joined, it will send a message every 60 seconds. While joining/configuration is in progress, and whenever the board is sending data, the LED will be lit.