-
Notifications
You must be signed in to change notification settings - Fork 13.3k
OTA Unsigned binary after first one is signed, espota.py reports [INFO]: Result: OK but update fails on esp8266 #7162
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
Comments
@earlephilhower I seem to remember this was a choice to allow rollback. Is that correct? |
After digging through stuff, this is all in the ArduinoOTA, the BasicOTA sketch, and espota.py from what I can see and not a security risk as the In reverse order:
If we add a new error code from ArduinoOTA then existing apps may break/output incorrect error messages when a signing fails. Leaving that as-is, you get "Error End" which is correct, if not specific. @devyte , @d-a-v , thoughts?
Lines 190 to 195 in 41d271d
I'll throw together a PR for the espota.py thing. The other bit, I think should leave as-is. |
The OTA script was not reporting the actual reported upload status from the ESP8266, and instead always printed "Result: OK" no matter what happened. Now check for ERROR or OK in final message (and ensure the message is not accidentally merged with the final byte count) and report properly. Fixes esp8266#7162
Agree with @earlephilhower. The behavior could be improved for the specific sign error, but if done it would have to be for next major. |
Thank you very much for your time. |
The OTA script was not reporting the actual reported upload status from the ESP8266, and instead always printed "Result: OK" no matter what happened. Now check for ERROR or OK in final message (and ensure the message is not accidentally merged with the final byte count) and report properly. Fixes #7162
I have signed a binary and uploaded via OTA - so next OTA updates should be signed.
Then tried to see if the esp8266 would accept an unsigned binary - it's expected that it should not accept.
So I uploaded via OTA an unsigned binary, and espota.py reported [INFO]: Result: OK
But it actually failed on the esp8266 side with Error[4]: End Failed
First: why is espota reporting OK if it failed?
And second, shouldn't the error on the esp side be UPDATE_ERROR_SIGN ?
I have used ArduinoOTA sketch for this tests.
The text was updated successfully, but these errors were encountered: