Examples

There are several examples for different chips to show how drogue device can be used. The examples are grouped by what sort of connectivity they use, and also by some capabilities such as over the air updates.

All examples can be debugged using cargo run, which often require the probe-run tool (cargo install probe-run) to flash the program.

You can also use the cargo-flash tool (cargo install cargo-flash) to run the examples in "production" mode.

Configuration

All examples requiring user credentials, e.g. WiFi, HTTP, LoRaWAN, will expect them in the top-level keys of .drogue/config.toml. Similar to how cargo configuration works, the build script for each example looks for that configuration file in the manifest directory, all of its parent directories, and finally in $HOME/.drogue/config.toml. If a key is specified in multiple config files, the values will be merged, with the value in the deeper directory taking precedence over its parents, the home directory having the lowest priority.

Credentials for your local WiFi network:

wifi-ssid = "..."
wifi-password = "..."

HTTP authentication:

http-username = "..."
http-password = "..."

Over The Air Authentication (OTAA) credentials for LoRaWAN:

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

These values will be read during compilation and stored in the executable.

Ethernet examples

Examples that demonstrates network connectivity using Ethernet.

Bluetooth examples

Over The Air (OTA) examples

Examples that have the capability of updating themselves over the air.

These examples require a bootloader to be flashed, which you can find alongside the example folder.