Skip to content

Commit 00e86e9

Browse files
cvaldessclaude
andcommitted
eth-ota: sync uploader result codes with firmware enum
The previous commit moved OTA_ERR_TIMEOUT from 0x06 to 0x08 to free 0x06 for OTA_ACK, but bin/eth-ota-upload.py still mapped 0x06 to "Timeout" — so a real timeout from the device (0x08) was printed as "Unknown result 0x08" instead of being identified. Align the mapping with the full OTAResponse enum in ethOTA.cpp: keep 0x00–0x03, remove the stale 0x06, and add 0x04 (magic), 0x05 (begin), 0x07 (auth), 0x08 (timeout) so every firmware response prints a human-readable message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 501bd0b commit 00e86e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/eth-ota-upload.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ def upload_firmware(host: str, port: int, firmware: bytes, psk: bytes, timeout:
167167
0x01: "CRC mismatch",
168168
0x02: "Size error",
169169
0x03: "Write error",
170-
0x06: "Timeout",
170+
0x04: "Magic mismatch",
171+
0x05: "Updater.begin() failed",
172+
0x07: "Auth failed",
173+
0x08: "Timeout",
171174
}
172175
code = result[0]
173176
msg = result_codes.get(code, f"Unknown result 0x{code:02X}")

0 commit comments

Comments
 (0)