Files
MeshCore/docs/heltec_v4_wifi_partition_migration.md
T
nullrouten0andClaude Opus 5.5 09435b049d Use the node's admin password for the migration bridge AP
The Wi-Fi, LoRa first-stage and Partition Expander bridges serve an
unauthenticated /update behind an AP whose password was fixed and published,
so anyone in range during a migration could upload firmware while the private
key is staged. Use the old node's saved admin password as the WPA2
passphrase, read from /com_prefs or /node_prefs at offset 56 as the firmware
loads it. The operator already used that password to start the old updater.

Fall back to the published password, with a serial warning, when the saved
admin password is missing, unreadable, shorter than 8 characters or not
printable ASCII, so no node becomes unreachable. The legacy filesystem is
mounted without formatting and the password is never printed. Migration
admission, flash sequencing, /update gating and the USB bridge are unchanged.
Update both guides and the package README.

Add a sanitizer-backed host test that compiles the bridge's actual Wi-Fi
block against fake SPIFFS and WiFi: both boots, file precedence, WPA2 length
and terminator bounds, printable characters, stock 1.10/1.11 file sizes,
truncated fields, and mount, seek and partial-read failures. It fails 8 of 8
on the previous code and catches 27 of 27 code mutations. Verified 13 related
host test files and the esp32_s3_4mb_partition_migrator build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:57:09 +00:00

1.7 KiB

View this page on MeshCore Docs.

Heltec V4 legacy-partition migration over Wi-Fi

Heltec V4/V4.3 OLED repeaters with their normal 16 MiB flash use the shared ESP32 partition migration bridge. It changes Arduino's old default.csv layout, with two 1.25 MiB OTA slots, to default_16MB.csv, with two 6.25 MiB OTA slots.

Build the complete V4 package with the repeatable ESP32 recipe in WSL/Linux:

python3 -B scripts/build_esp32_partition_migration.py \
  --board heltec-v4 --version v1.17.1.7-halo-keymind-cascade-dev \
  --radio-preset usa-cascadia --profile cascade

The ZIP contains the Wi-Fi bridge, LoRa bridge, and exact-target Full image. Upload its wifi-bridge.bin through the legacy browser Wi-Fi updater. Rejoin MeshCore-Migrate using the node's saved admin password as the Wi-Fi password (see the shared guide for the published fallback); when it reports Expanded layout ready, upload the ZIP's full-application.bin at /update.

Do not use an -merged.bin in either browser uploader. Merged images contain bootloader and table offsets for cable flashing. The bridge preserves the private identity; other SPIFFS-backed settings may be recreated after the Full image starts.

For an existing heltec_v4_repeater that already supports LoRa mOTA, use the separate LoRa migration package described in the shared guide. It preserves the old repeater across the partition change so the full image can also be installed over LoRa without reaching the board's Wi-Fi network.