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:
  1. [Update.begin(total_file_size);
  2. if (Update.write((uint8_t*)json_buff, data_size) != data_size) {
  3.             Update.printError(Serial);
  4.           }]
  5.  
  6. If writing completed then call:
  7. [Codebox=c file=Untitled.c][if (total_file_size == total_data_size) {
  8.             if (Update.end(true)) { //true to set the size to the current progress
  9.               Serial.printf("Update Success: %u\nRebooting...\n", total_data_size);
  10.               if (Update.isFinished()) {
  11.                 Serial.println("Update successfully completed. Rebooting.");
  12.                 ESP.restart();
  13.               } else {
  14.                 Serial.println("Update not finished? Something went wrong!");
  15.               }
  16.             } else {
  17.               Update.printError(Serial);
  18.             }]
  19. But after 4096 writing complete getting wrong magic bytes ERROR.
  20.  
  21. Please suggest me what should i do now?

Who is online

Users browsing this forum: Bing [Bot] and 93 guests