FwUpdate: over the mesh only deltas, a full image only over USB / BLE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-13 15:25:53 +01:00
1 parent 9080d8339d
commit 9165590d13
2 files changed
+24 -7

No files matched your search

+8 -3
View File
@@ -18,7 +18,8 @@
// that jumps into half an image.
//
// fw status state, progress, battery
// fw begin <bytes> start a transfer of a package (tools/ota_pack.py)
// fw begin <bytes> start a transfer of a package (tools/ota_pack.py);
// over the mesh only a delta (<= FW_OTA_PATCH_AREA)
// fw w <offset> <base64> one chunk, offset a multiple of FW_OTA_CHUNK
// fw missing first missing chunk offsets (for resending)
// fw verify signature + hashes + dry-run inflate
@@ -83,8 +84,8 @@ private:
enum Job : uint8_t { JOB_NONE, JOB_MANIFEST, JOB_VERIFY };
void cmdStatus(char *reply);
void cmdBegin(const char *arg, char *reply);
void cmdWrite(const char *arg, char *reply);
void cmdBegin(uint32_t sender_timestamp, const char *arg, char *reply);
void cmdWrite(uint32_t sender_timestamp, const char *arg, char *reply);
void cmdMissing(char *reply);
void cmdVerify(char *reply);
void doVerify();
@@ -108,6 +109,10 @@ private:
uint8_t _format = 0;
Job _job = JOB_NONE;
bool _manifest_ok = false;
// Any part of the transfer came over the mesh (remote CLI or a binary
// request). Then only a DELTA is accepted: a full image is ~300 kB, hours of
// airtime on a shared channel -- it goes over USB or the BLE console.
bool _remote = false;
bool _base_known = false;
uint8_t _base_sha[32];
// The manifest is checked from this RAM copy, not from the stage in flash: three