Skip to content

OTA update error : esp_image: image at 0x150000 has invalid magic byte after flash enctiption #3976

Closed
@sboicu

Description

@sboicu

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 |  

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions