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 Firmware NVS Keys

Firmware NVS Keys

Edit on GitHub

The Non-Volatile Storage keys the firmware uses to persist configuration, and how to read or reset them.

Firmware NVS Keys

The ESP32’s Non-Volatile Storage (NVS) partition is a small flash-backed key-value store. The firmware keeps its whole configuration there, so settings survive power loss and reboots.

Key layout

KeyTypeContent
cfgblobThe full configuration struct, versioned
gps_lastblobLast valid GPS fix (lat, lon, altitude, age)
boot_countu32Number of boots, used by diagnostics
cal_rssii32RSSI calibration offset, if applied

Why one blob

The configuration is stored as a single versioned blob rather than dozens of individual keys. This makes the config atomic: either the whole blob is valid or it is replaced by defaults. The first field of the blob is a magic number plus a version, so firmware updates can migrate old layouts (see Changelog for the v4 to v5 migration).

Reading the store

When the firmware boots:

  1. nvs_flash_init() opens the default partition.
  2. The cfg blob is read.
  3. If the magic or version mismatches, defaults are written back.

Resetting

Factory reset (MODE + SEL held for 5 seconds, see Factory Reset and Recovery) erases the cfg key and rewrites defaults. The GPS fix is also cleared so the device does not transmit stale coordinates after a reset.

Using the serial debugger

With the serial debug build, config dump prints every key in the store. This is the fastest way to confirm what the device thinks its configuration is.