ESP32S3 HTTP Update failed

Hello Everyone,

I am trying "Esp32HTTPUpdate.h"
library in ESP32S3 DevModule. I used the example code of that library with simple modifications like servername, WiFi ssid and password. here is the example code....

/**
 * httpUpdate.ino
 *
 *  Created on: 27.11.2015
 *
 */

#include <Arduino.h>

#include <WiFi.h>

#include <HTTPClient.h>
#include <ESP32httpUpdate.h>

#define USE_SERIAL Serial

void setup() {

    USE_SERIAL.begin(115200);
    // USE_SERIAL.setDebugOutput(true);

    USE_SERIAL.println();
    USE_SERIAL.println();
    USE_SERIAL.println();

    for(uint8_t t = 4; t > 0; t--) {
        USE_SERIAL.printf("[SETUP] WAIT %d...\n", t);
        USE_SERIAL.flush();
        delay(1000);
    }

    WiFi.begin("SSID", "PASSWORD");

}

void loop() {
    // wait for WiFi connection
    if((WiFi.status() == WL_CONNECTED)) {

        t_httpUpdate_return ret = ESPhttpUpdate.update("http://server/file.bin");

        switch(ret) {
            case HTTP_UPDATE_FAILED:
                USE_SERIAL.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
                break;

            case HTTP_UPDATE_NO_UPDATES:
                USE_SERIAL.println("HTTP_UPDATE_NO_UPDATES");
                break;

            case HTTP_UPDATE_OK:
                USE_SERIAL.println("HTTP_UPDATE_OK");
                break;
        }
    }
}


I do all the modification on my sides which i mentioned above.

→When i do OTA update via server using this code i got below error

CORRUPT HEAP: Bad tail at 0x3fcbed3c. Expected 0xbaad5678 got 0x40010010
assert failed: multi_heap_free multi_heap_poisoning.c:259 (head != NULL)

→ So how can i resolve this error and made my code running in ESP32S3 dev module
Anyone have Idea on this?

maybe, the lib you linked too is really old and looks like it has been moved into the core..
espressif/arduino-esp32/tree/master/libraries/HTTPUpdate

maybe try that version..

good luck.. ~q

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.