Documentation
Onboarding
Getting Started
Power & Battery
Hardware & Components
Build & Assembly
Radio & RF Design
Frequencies & Regulations
Firmware & Software
USB & Connectivity
GPS & Navigation
Morse & Communication
Modes & Operation
Field Operations & Rescue
Building Effectively
Build Variants
Project & Reference
Docs Firmware & Software Configuration Reference

Configuration Reference

Edit on GitHub

Every firmware constant, NVS key, button binding and calibration procedure in one reference

Configuration Reference

Overview

All configuration is stored in NVS (Non-Volatile Storage) and survives power cycles. Settings can be changed via the CONFIG portal or by editing firmware constants.

Firmware Constants

Info

These constants are compile-time defaults. Change them before flashing, or use the CONFIG portal to modify at runtime.

Radio Settings

CODE
#define DEFAULT_FREQ_MHZ      433.500f   // Default frequency (MHz)
#define DEFAULT_POWER_DBM     17         // TX power (dBm) -- up to 22 via RadioLib
#define DEFAULT_SLEEP_SEC     10         // Deep sleep between TX cycles (s)
#define DEFAULT_REPEAT_COUNT  3          // Message repetitions per frequency

Morse Settings

CODE
#define DEFAULT_MESSAGE       "SOS"      // Base Morse message
#define DEFAULT_WPM           13         // Words per minute

Audio Settings

CODE
#define DEFAULT_AUDIO_VOL     180        // 0-255 DAC volume
#define DEFAULT_AUDIO_ENABLE  true       // Audio on/off

Display Settings

CODE
#define DEFAULT_OLED_ENABLE   true       // OLED on/off
#define DEFAULT_OLED_INVERT   false      // Invert colors for sunlight

Scan Settings

CODE
#define DEFAULT_SCAN_DWELL_MS 400        // RSSI dwell time per frequency (ms)
#define DEFAULT_RSSI_THRESH   -90        // Detection threshold (dBm)

Battery Settings

CODE
#define BAT_VREF_MV           3900       // ADC full-scale voltage in mV
#define BAT_SAMPLES           32         // ADC samples per reading
#define BAT_READ_MS           5000       // Battery read interval (ms)

GPS Settings

CODE
#define GPS_FIX_TIMEOUT_S     60         // Max seconds to wait for fix
#define GPS_MIN_SATS          3          // Minimum satellites for valid fix

NVS Keys

All settings live in the ESP32 Non-Volatile Storage under the namespace aegis. The exact keys below match the firmware Preferences reads/writes.

KeyTypeDefaultRange / Notes
fcountuint811-10 frequencies
freq0..freq9float433.500MHz, one key per frequency slot
msgstring“SOS”Max 64 chars, A-Z 0-9 space
wpmuint8135-40
pwrint817-9 to +22 dBm
sleepulong10Deep sleep seconds between TX cycles
dwelluint1640050-2000 ms scan dwell time
rssiint8-90-120 to -40 dBm detection threshold
modeuint800=BEACON 1=SEARCH 2=CONFIG 3=EMERGENCY
aswitchboolfalseAuto-switch to BEACON on low battery
repuint811-10 message repetitions per frequency
avoluint81800-255 DAC volume
aenbooltrueMaster audio enable
olenbooltrueOLED enable
olinvboolfalseOLED invert mode
gpsenboolfalseGPS module enable
gpsbeacboolfalseInclude GPS coords in Morse payload
gpstmouint830GPS fix wait timeout (10-120 s)
namenboolfalseInclude name in Morse payload
fnamestring""First name (max 32 chars)
lnamestring""Last name (max 32 chars)
potenboolfalseSW_UP/DN volume adjust enable
potwpmboolfalseSW_UP/DN WPM adjust enable

Note

Key names are intentionally short (NVS has per-key overhead). freq0..freq9 are separate keys, not an array.

Fail-safe: if NVS is empty, corrupt, or missing any key, the firmware falls back to the hardcoded defaults in the section above. The device is always functional after a factory reset or first flash.

Button Reference

ButtonGPIOPressDurationAction
SW_MODE33Short< 2sToggle BEACON/SEARCH
SW_MODE33Long>= 2sActivate EMERGENCY
SW_SEL32Short< 3sToggle VOL/WPM target
SW_SEL32Long>= 3sLaunch WiFi AP
SW_SEL32Hold>= 1sSave to NVS
SW_UP35Short—Increment parameter
SW_UP35Hold> 500msAuto-repeat increment
SW_DN34Short—Decrement parameter
SW_DN34Hold> 500msAuto-repeat decrement
MODE+SEL33+32Both>= 5sFactory reset

Warning

Factory reset erases all NVS configuration. Device reboots with default settings.

Factory Reset Procedure

  1. Power on device
  2. Hold both MODE and SEL buttons
  3. Keep holding for 5 seconds
  4. Device reboots with default configuration
  5. Reconfigure via CONFIG portal

Calibration

Battery Voltage

If readings differ from multimeter measurement:

CODE
#define BAT_VREF_MV   3900   // Increase if too low, decrease if too high

Audio Volume

Default 180 (~70%). Adjust via UP/DN buttons when VOL is selected.

Morse Speed

Default 13 WPM. Adjust via UP/DN buttons when WPM is selected.

Tip

Hold SEL for 1 second to save current VOL and WPM to NVS. Values persist across power cycles.