There are several examples for different chips to show how drogue device can be used. The examples are grouped by how advanced they are, and what they demonstrate such as networking, but may overlap for examples that cover more than one area.
All example can be run using
cargo run, which in some cases require the
probe-run tool (
install probe-run) to flash the program.
Any examples requiring user credentials, e.g. WiFi, HTTP, OTAA, 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-username = "..." http-password = "..."
Over The Air Authentication (OTAA) credentials:
"dev-eui" = "..." "app-eui" = "..." "app-key" = "..."
These values will be read during compilation and stored in the executable.
Examples that demonstrates network connectivity using WiFi, usually using an additional network adapter module. May require setting up additional network services (locally or third party).
Examples that demonstrates network connectivity using LoRaWAN. May require setting up additional network services (locally or third party).
Examples that demonstrate connectivity to Drogue Cloud.