Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIRE-10] Make ota error codes homogeneous and board specific #388

Closed
pennam opened this issue Oct 16, 2023 · 0 comments · Fixed by #449
Closed

[WIRE-10] Make ota error codes homogeneous and board specific #388

pennam opened this issue Oct 16, 2023 · 0 comments · Fixed by #449
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@pennam
Copy link
Collaborator

pennam commented Oct 16, 2023

This issue will resume the WIP on this issue and related PR:

ESP32

Value Description
None 0 No Error
NoOtaStorage -302 Partition table is not compatible with OTA #19
OtaStorageInit -303 Failure initializing OTA storage. Check partition table
OtaHeaderLength -305 OTA header length field do not match http content length
OtaHeaderCrc -306 OTA header CRC32 mismatch
OtaHeaterMagicNumber -307 Wrong magic number in OTA header
ParseHttpHeader -308 Error parsing http Header.
Parsing occurs to check Http response and content length
UrlParseError -309 Unknown url type not http nor https
ServerConnectError -310 Cannot connect to download server
HttpHeaderError -311 Cannot download http Header
OtaDownload -312 Downloaded file size not matching http Content-Length
OtaHeaderTimeout -313 Timeout downloading OTA Header
HttpResponse -314 Received http response different from 200 OK
OtaStorageEnd -315 Error writing configuration to bootloader.
Can be extended calling Update.getError()

SAMD

Error codes are coming from NINA-FW

Error Value Description
None 0 No Error
OtaHeaderCrc -206 OTA header CRC32 mismatch
OtaDownload -212 OTA file size do not match OTA header length field
OpenUpdateFile -219 Cannot create file to download update. fopen() failure
Rename -223 Error renaming file before starting OTA. rename() failure

Other error codes can be added checking and extending downloadAndSaveFile(...)

RP2040 Connect

Error Value
None 0
StorageInit -103
ParseHttpHeader -108
UrlParse -109
ServerConnect -110
HttpHeader -111
HttpResponse -114 #392
HttpData -102
OpenUpdateFile -119
WriteUpdateFile -120
Reformat -121
Unmount -122

UNO WiFi R4

Error Value
None 0
NoOtaStorage -402
OtaStorageInit -403
OtaHeaderLength -405
OtaHeaderCrc -406
OtaHeaderMagicNumber -407
ParseHttpHeader -408
UrlParse -409
ServerConnect -410
HttpHeader -411
OtaDownload -412
OtaHeaderTimeout -413
HttpResponse -414
OtaStorageEnd -415
StorageConfig -416
Library -417
Modem -418

TODO check flasher errors
| OtaFlash | -412 |

STM32H7

Value Description
NoCapableBootloader -1 Bootloader version cannot handle OTA
NoOtaStorage -2 Defined but not used
OtaStorageInit -3 Cannot initialize OTA storage
OtaStorageOpen -4 Cannot open OTA file for download
OtaHeaderLength -5 OTA header length field do not match http content length
OtaHeaderCrc -6 OTA header CRC32 mismatch
OtaHeaterMagicNumber -7 Wrong magic number in OTA header

Summary As is

ESP32 UNO WiFi R4 STM32H7 RP2040 SAMD21
None 0 0 0 0 0
NoCapableBootloader NA NA -1 NA NA
StorageConfig NA -401 NA NA NA
NoOtaStorage -302 -402 -2 Defined but not used NA NA
OtaStorageInit -303 -403 -3 ErrorFlashInit -107 NA
OtaStorageOpen NA NA -4 NA NA
OtaStorageEnd -304 -404 NA NA NA
UrlParseError -305 -405 NA -100 NA
ServerConnectError -306 -406 NA -101 NA
HttpHeaderError -307 -407 NA -102 NA
ParseHttpHeader -308 -408 NA -106 NA
OtaHeaderLength -309 -409 -5 NA NA
OtaHeaderCrc -310 -410 -6 NA -203
OtaHeaterMagicNumber -311 -411 -7 NA NA
OtaDownload -312 -412 NA HttpDataError -103 -202
OtaHeaderTimeout -313 -413 NA NA NA
HttpResponse -314 -414 NA NA NA
ErrorOpenUpdateFile NA NA NA -104 -201
ErrorWriteUpdateFile NA NA NA -105 NA
ErrorReformat NA NA NA -108 NA
ErrorUnmount NA NA NA -109 NA
Errorrename NA NA NA NA -204

Summary To Be

ESP32 UNO WiFi R4 STM32H7 RP2040 SAMD21
None 0 0 0 0 0
NoCapableBootloader NA NA -1 NA NA
NoOtaStorage -302 -402 -2 NA NA
OtaStorageInit -303 -403 -3 -103 NA
OtaStorageOpen NA NA -4 NA NA
OtaHeaderLength -305 -405 -5 NA NA
OtaHeaderCrc -306 -406 -6 NA -206
OtaHeaterMagicNumber -307 -407 -7 NA NA
ParseHttpHeader -308 -408 NA -108 NA
UrlParseError -309 -409 NA -109 NA
ServerConnectError -310 -410 NA -110 NA
HttpHeaderError -311 -411 NA -111 NA
OtaDownload -312 -412 NA -112 -212
OtaHeaderTimeout -313 -413 NA NA NA
HttpResponse -314 -414 NA -114 NA
OtaStorageEnd -315 -415 NA NA NA
StorageConfig NA -416 NA NA NA
Library NA -417 NA NA NA
Modem NA -418 NA NA NA
ErrorOpenUpdateFile NA NA NA -119 -219
ErrorWriteUpdateFile NA NA NA -120 NA
ErrorReformat NA NA NA -121 NA
ErrorUnmount NA NA NA -122 NA
ErrorRename NA NA NA NA -223
@pennam pennam changed the title Make ota error codes homogeneous and board specific [WIRE-10] Make ota error codes homogeneous and board specific Oct 17, 2023
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Oct 19, 2023
@pennam pennam self-assigned this Oct 24, 2023
@pennam pennam linked a pull request May 9, 2024 that will close this issue
@per1234 per1234 added the conclusion: resolved Issue was resolved label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants