-
Notifications
You must be signed in to change notification settings - Fork 7.6k
OTA update error : esp_image: image at 0x150000 has invalid magic byte after flash enctiption #3976
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
The current Arduino OTA doesn’t support encrypted flash. There are two issues 1) the bootloader is pre-compiled and doesn’t have encryption support. You’ve worked around this one though by programming with ESP-IDF. For the second issue see my PR for details of the problem and a proposed fix. Let me know how you get on. |
Thanks for your reply. I am not quite sure I understand what I need to do. |
1.I have updated: Esp.cpp, Esp.h, Update.h and Update.cpp as per instructions. 2.I exported my .ino project in the compiled bin with Arduino IDE 3.went to my app website and upload the new bin file. Unfortunately, I have the same error. I still have the same result |
Ok. this fixed my issue. I have uploaded the new code to a new board, with flash encryption as well. Everything is working fine now. My OTA is also working. Thank you very much for your great support. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Hello, I also use Arduino development and Flash encryption, also encountered OTA errors |
Hii Have you solved encryption + OTA + Arduino IDE ? |
Hi.
I have enabled flash encryption on my esp32 board in release mode.
Everything is working fine. I have also a script to have OTA updates. I compile everything with Arduino IDE.
Unfortunately at the end of the upload of the new .BIN file I get those errors :
esp_image: image at 0x150000 has invalid magic byte
E (91901) esp_image: image at 0x150000 has invalid magic byte
E (91902) boot_comm: image has invalid chip ID, expected at least 0, found 717
E (91904) boot_comm: image has invalid chip revision, expected at least 1, found 224
Could Not Activate The Firmware
Before flash encryption, everything was working just fine. Updates over OTA were working very well. After encryption not.
What I also did is to program another board with ESP IDF native ota example, and set the upload new bin file to the one I am trying to update on my ota http application. I flash board with native ota, and then native ota uploads the new code, but when I use my own ota page is not working.
What would be the cause?
Maybe it helps, I am using async wifi libraries.
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: fc:f5:c4:4a:5a:cc
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Partition settings :
Name | Type | SubType | Offset | Size | Flags
-- | -- | -- | -- | -- | --
nvs | data | nvs | 0x9000 | 0x5000 |
otadata | data | ota | 0xe000 | 0x2000 |
app0 | app | ota_0 | 0x10000 | 0x140000 |
app1 | app | ota_1 | 0x150000 | 0x140000 |
spiffs | data | spiffs | 0x290000 | 0x170000 |
The text was updated successfully, but these errors were encountered: