ESP_HTTPS_OTA failing on large bin files

QuentinB
Posts: 1
Joined: Wed Jun 19, 2019 5:53 pm

ESP_HTTPS_OTA failing on large bin files

Postby QuentinB » Wed Jun 19, 2019 6:06 pm

Okay, so I have an interesting issue here.

I'm running on Mac OSX 10.14.5 with the ESP32_DevKitC.

I'm just using the ota_example at this point. I've tried and succeeded in flashing the hello_world.bin from the idf examples, but when I try a .bin of the project I'm working on (~1.2MB) the process will start flashing and I'll see successful HTTP transfers, but eventually fail with the following output:

Code: Select all

E (101207) esp_image: invalid segment length 0x456d3133
E (101207) esp_https_ota: Error: esp_ota_write failed! err=0x0
E (101207) simple_ota_example: Firmware upgrade failed
I piped all debug output into a .log file, which I've attached, as its quite long.

Attempts to fix/workaround:
  • Re-built app, after manually checking it flashes normally
  • Imaged .bin file onto device using otatool.py successfully
  • switched from openssl-based dummy server to python-based server
Attachments
debug.log
(1005.85 KiB) Downloaded 691 times

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP_HTTPS_OTA failing on large bin files

Postby Ritesh » Sat Jun 22, 2019 11:15 am

QuentinB wrote:
Wed Jun 19, 2019 6:06 pm
Okay, so I have an interesting issue here.

I'm running on Mac OSX 10.14.5 with the ESP32_DevKitC.

I'm just using the ota_example at this point. I've tried and succeeded in flashing the hello_world.bin from the idf examples, but when I try a .bin of the project I'm working on (~1.2MB) the process will start flashing and I'll see successful HTTP transfers, but eventually fail with the following output:

Code: Select all

E (101207) esp_image: invalid segment length 0x456d3133
E (101207) esp_https_ota: Error: esp_ota_write failed! err=0x0
E (101207) simple_ota_example: Firmware upgrade failed
I piped all debug output into a .log file, which I've attached, as its quite long.

Attempts to fix/workaround:
  • Re-built app, after manually checking it flashes normally
  • Imaged .bin file onto device using otatool.py successfully
  • switched from openssl-based dummy server to python-based server
Hello,

Would you please let me know that are you using custom partition table or default partition table for OTA?

because you image size is higher then 1 MB and at that time you need to use custom partition to keep OTA partition for 1.5 or 2 MB as per your OTA size.
Regards,
Ritesh Prajapati

ESP_Mahavir
Posts: 190
Joined: Wed Jan 24, 2018 6:51 am

Re: ESP_HTTPS_OTA failing on large bin files

Postby ESP_Mahavir » Mon Jun 24, 2019 5:26 am

As Ritesh pointed out, your partition table (from log you shared) is allocating 1M for `ota_x` partitions, you will need to customize partition table and allocate little larger space (per your upgrade binary requirement), that should help to fix the problem.

Thanks.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP_HTTPS_OTA failing on large bin files

Postby Ritesh » Mon Jun 24, 2019 8:24 am

ESP-MJ wrote:
Mon Jun 24, 2019 5:26 am
As Ritesh pointed out, your partition table (from log you shared) is allocating 1M for `ota_x` partitions, you will need to customize partition table and allocate little larger space (per your upgrade binary requirement), that should help to fix the problem.

Thanks.
Thanks for Reply.

Exactly like that.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 131 guests