Firmware setup
The firmware lives in open-aiq/device:
Rust on ESP-IDF for the ESP32-S3.
Flash a release
Section titled “Flash a release”Each firmware release has two images per OLED controller:
| File | Use |
|---|---|
airmonitor-<version>-<oled>-full.bin |
First USB flash, written at 0x0:Bootloader Partition table App |
airmonitor-<version>-<oled>-ota.bin |
App image only, used for over-the-air updates |
espflash write-bin 0x0 airmonitor-v0.4.2-sh1106-full.binCheck it against SHA256SUMS first. You only flash over USB once; after that,
updates arrive over the air.
Build from source
Section titled “Build from source”You need the Xtensa Rust toolchain from
espup and
espflash. rust-toolchain.toml selects
the esp toolchain.
make help # every commandmake build # release build for the default SH1106 OLEDmake build OLED_CONTROLLER=ssd1306make verify # format, host tests, Clippy, both OLED buildsmake flash # build, flash with partitions + rollback bootloader, monitormake monitor # serial monitor onlyAlways flash with make flash. Plain espflash flash replaces the A/B
partition table and rollback bootloader, so updates can’t roll back safely.
The backend URL defaults to https://api.air-iq.net/api/v1. To use your own,
set BACKEND_BASE_URL at build time. HTTPS uses ESP-IDF’s built-in certificate
bundle.
Serial console
Section titled “Serial console”With make monitor open, type a line and press Enter instead of pressing
buttons:
| Line | Same as |
|---|---|
BTN:PAIR |
Holding the pair button for 3 s |
BTN:LEFT / BTN:RIGHT |
Left / right button |
BTN:HELP |
Lists these commands |
Development provisioning
Section titled “Development provisioning”A development build can seed empty storage, skipping the app:
MOCK_WIFI_SSID=... MOCK_WIFI_PASSWORD=... \MOCK_DEVICE_ID=dev_... MOCK_DEVICE_KEY=sk_... \MOCK_LAT=24.8607 MOCK_LON=67.0011 make buildThese values are compiled into the binary, so never share or release it.
WIPE_CONFIG_ON_BOOT=1 erases storage on every boot; use it only when you mean
to reset.
Releases
Section titled “Releases”Maintainers run make release on a clean main. It checks the
version registry, runs make verify, builds both images for
both OLED controllers, tags the version, and publishes a GitHub release.
Stuck on a build or flash? Open an issue in
open-aiq/device and we’ll help.