scottchiefbaker / ESP-WebOTA

Simple web based Over-the-Air (OTA) updates for ESP based projects
MIT License
291 stars 40 forks source link

Flash config wrong real: 1048576 IDE: 4194304 #11

Open BozoTClown opened 4 years ago

BozoTClown commented 4 years ago

I have worked on this problem all day today. I have tried different IDE configurations, clearing flash, loading via different methods and non of them solved this issue. It was working fine and now it won't work on any of my devices. The only way I can get code to modify is to use esptool. If you have any suggestions, I am open to anything.

UPDATE

After working on this for another day, I finally found a workaround for it. I compiled and uploaded your basic OTA sketch on one of my RPI. Once that completed successfully I opened a browser and used the OTA and uploaded the bin file that would not load. This worked and now all of my devices are able to perform OTA's. I had two that wouldn't work and the rest where fine. I thought it might be helpful to post this in case someone in the future has the same issue.

TIA Menu Chip Errors

Stef-90 commented 1 year ago

I accidentally updated couple of devices with 1mb memory using esp12e board configuration in esphome it flashed but then It made all of them throw same error you showed here when i try to update them again i fixedthe files to use esp01-1m . Real 1m ide 4mb

I just compiled this ota only with arduino ide but cant flash it getting the same error. What was the trick?

I see esptool in your screenshot, were you able to fix memory error via ota update or you had to do serial flash. I'm trying to avoid removing 20swiches from wall and soldering pins again

BozoTClown commented 1 year ago

If I remember correctly I had to erase memory before I could go any further. If this doesn't help, let me know and I will dig deeper.

I did have to hook my devices back up to esptool in order to re-flash. Mine wasn't to bad because when I solder my connectors on I leave them on. The fit inside my SonOff cases. I used the following code to clear memory. If you use it make sure you select the correct memory size.

`/ EEPROM Clear Sets all of the bytes of the EEPROM to 0. This example code is in the public domain. /

include

include

const char host = "ESP-OTA"; // Used for MDNS resolution const char ssid = "Starwars_N"; const char* password = "5d1ae1c3eb";

void setup() {

init_wifi(ssid, password, host);

EEPROM.begin(512); // write a 0 to all 512 bytes of the EEPROM for (int i = 0; i < 1024; i++) { EEPROM.write(i, 0X0); }

// turn the LED on when we're done pinMode(13, OUTPUT); digitalWrite(13, HIGH); EEPROM.end(); }

//ESP.restart();

void loop() {

webota.handle();

} `