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>
This commit is contained in:
1 parent
0e72474f41
commit
09435b049d
6 files changed
+444
-10
No files matched your search
@@ -506,8 +506,12 @@ installing the bridge; the bridge does not itself repeat normal traffic.
|
||||
1. On the old node, run `start ota ap` through its authenticated terminal.
|
||||
Join its `MeshCore-OTA` Wi-Fi and upload `wifi-bridge.bin` at the exact
|
||||
`Started:` URL returned by the command (the port can vary by old build).
|
||||
2. Keep power stable. Join `MeshCore-Migrate` (password `meshcore-migrate`),
|
||||
open `http://192.168.4.1/`, and wait for **Expanded layout ready**.
|
||||
2. Keep power stable. Join `MeshCore-Migrate` using the node's saved admin
|
||||
password as the Wi-Fi password, open `http://192.168.4.1/`, and wait for
|
||||
**Expanded layout ready**. If that password is shorter than 8 characters
|
||||
or was never saved, the bridge falls back to the published
|
||||
`meshcore-migrate`, which anyone nearby can use; set a longer admin
|
||||
password before step 1.
|
||||
3. At that page's `/update`, upload `full-application.bin`.
|
||||
"""
|
||||
usb_instructions = f"""## Host-managed USB route
|
||||
|
||||
Reference in new issue
Block a user