-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
OTA compatibility issue #9049
Comments
Is this ESP32 remote and can't be reached or you have access to it in order to upload a completely new firmware, boot, partition file etc. using a computer + cable? |
@SuGlider I have some here with me to experiment with, but hundreds of others are remote (in the hands of users). I distribute binaries to users for updates, which they upload using my OTA methods, and can store on the devices eMMC memory. Why do you ask? |
The firmware compile process does not use any info from the partition scheme. Only when flashing via wire the partition scheme is relevant. Your compiled firmware (used for OTA) will not be different when using different partition schemes. |
What i can imagine, that code compiled which includes insights and coredump support (actual Arduino cores) is not compatible (crashing) when the partitions the need are not found. And i dislike (and removed) the needed change for insights which needs sha256 #7566 (comment) this makes it impossible for esptool.py to adjust the magic firmware file header. |
It would be useful for me, and I imagine many others using OTA in commercial projects, to have a precise understanding of which version of Arduino-ESP32 breaks OTA compatibility, if indeed that is a real thing, and if there are steps required to work around, so we can continue to enjoy new versions in Arduino IDE or Arduino CLI. My assumption has always been that a bad binary would (worst case scenario) trigger a rollback. This crash I am experiencing bricks the device, which is fairly terrifying. |
The platformio-build-esp32.py file is the best place to find the build version. To find what it is with your gold image, extract it from a working device with esptool: |
@lbernstone is there meant to be a guarantee that binaries will be compatible for OTA across arduino-esp32 versions? If not is there documentation on which are, or are not, compatible? |
This product is LGPL- there are no guarantees on suitability for anything. That said, upgrades from one version to a newer one are expected to work. I understand your frustration, and we will help you identify the problem, but you are going to have to provide the time and resources to troubleshoot it. |
@lbernstone thanks. If I can isolate a bug I will definitely make a proper bug report. Right now I am just looking for information. It sounds like nobody who has responded yet has experienced this, or is aware of any known incompatibility issues for OTA. It also doesn't sound like there are any best practises on the subject that I am not aware of, or not implementing currently. I would have guessed that changing the default partitions.csv file would be a breaking change for OTA. Is this known to not be the case? IE. if a newer version fails to find a coredump partition, or any other newly added partition, is it able to proceed, or will it crash? And if it does crash, will it try to trigger a rollback? |
OTA only works on the existing partitioning. If you change the size of the OTA, it will either be too small to fit the new image, which will give you an error, or it is even larger, and fits easily. |
in general firmware compiled with newer IDF should work with older bootloader/partition scheme, assuming your image did not exceed the partition limits and arduino foulks dont make drastic changes in bootloader config. |
If I switch back to Arduino-cli, I seem to be able to get things working again. |
After more testing the issue is entirely with PIO. infuriating. sorry, I will close this. |
Board
ESP32 WROVER
Device Description
https://www.sparkfun.com/products/21307
Hardware Configuration
eMMC, DAC, etc
Version
v2.0.14
IDE Name
Arduino IDE
Operating System
macos
Flash frequency
80
PSRAM enabled
yes
Upload speed
115200
Description
I am struggling to debug an issue regarding OTA updates.
For the last few years, I have had seamless OTA update processes running.
I use the Update() library to implement a manual update system.
Recently, the .bin files have been incompatible, producing odd behaviour after an update, such as failing to boot, (RTCWDT reset in a loop) or, sometimes a rollback, with the error code indicating "failed to erase".
I noticed that in this commit 161b167, @lbernstone and @me-no-dev changed the default partition tables, to include
coredump
and changed the size of the SPIFFS partition.My project does not have a partitions.csv file, so relies on the default.
I am unfortunately in a position where I am unclear about what versions of arduino-esp32 were previously working for me, and the process of regression testing is getting very hard. I suspect I was previously on 2.0.2.
I am wondering if there is any information you guys could share that could help ... are you aware of any such issues where an update of arduino-esp32 causes incompatible binaries, when using the default.csv partitions?
thanks!
Sketch
https://github.com/marchingband/wvr
Debug Message
Other Steps to Reproduce
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: