FwUpdate: transfer session id; binary chunks of another session are dropped
This commit is contained in:
1 parent
3a7140fd51
commit
b4d2601c8f
2 files changed
+20
-8
No files matched your search
@@ -39,9 +39,14 @@
|
||||
|
||||
// Binary request carrying firmware data (over the mesh, admin only). Upstream
|
||||
// request types are 0x01..0x07; 0xF0 is far from them on purpose.
|
||||
// [0xF0]['w'][offset u32 LE][len u8][data] chunk, no reply. The length is
|
||||
// explicit: the node only sees the
|
||||
// decrypted size padded to 16 B.
|
||||
// [0xF0]['w'][sid u16][offset u32 LE][len u8][data] chunk, no reply. The
|
||||
// length is explicit (the node only sees
|
||||
// the decrypted size padded to 16 B); sid
|
||||
// is the session from `fw begin <bytes>
|
||||
// <sid>`, chunks of another session are
|
||||
// dropped -- stale chunks of an earlier
|
||||
// transfer did arrive late on the bench and
|
||||
// replaced the new manifest.
|
||||
// [0xF0]['m'] reply: [state][units u16][count u16]
|
||||
// [missing unit index u16 ...]
|
||||
// state: 0 idle, 1 receiving, 2 ready, 3 failed, 4 busy (manifest/verify)
|
||||
@@ -109,6 +114,7 @@ private:
|
||||
// that was still in flash at the same address. _flash_diff records a readback
|
||||
// mismatch after the flush, for diagnosis (`fw status`).
|
||||
uint8_t _mani[FW_OTA_MANIFEST_SIZE];
|
||||
uint16_t _sid = 0; // transfer session, 0 = none given (text-only senders)
|
||||
bool _flash_diff = false;
|
||||
char _version[48] = { 0 };
|
||||
char _err[64] = { 0 };
|
||||
|
||||
Reference in new issue
Block a user