Getting Wrong Magic Byte for OTA ESP32

vishal.borle
Posts: 13
Joined: Thu May 07, 2020 1:32 pm

Getting Wrong Magic Byte for OTA ESP32

Postby vishal.borle » Thu Sep 10, 2020 1:53 pm

Hello to all,

I am trying to update ESP32 OTA using SIM800C module. I am using below API's:

Code: Untitled.c Select all

[Update.begin(total_file_size);
if (Update.write((uint8_t*)json_buff, data_size) != data_size) {
Update.printError(Serial);
}]

If writing completed then call:
[Codebox=c file=Untitled.c][if (total_file_size == total_data_size) {
if (Update.end(true)) { //true to set the size to the current progress
Serial.printf("Update Success: %u\nRebooting...\n", total_data_size);
if (Update.isFinished()) {
Serial.println("Update successfully completed. Rebooting.");
ESP.restart();
} else {
Serial.println("Update not finished? Something went wrong!");
}
} else {
Update.printError(Serial);
}]
But after 4096 writing complete getting wrong magic bytes ERROR.

Please suggest me what should i do now?

Who is online

Users browsing this forum: PerplexityBot, Qwantbot and 3 guests