Moderator: igrr
#include <ESP8266httpUpdate.h>
t_httpUpdate_return ret = ESPhttpUpdate.update("http://www.urlpath.com/subpath/update.bin");
switch (ret) {
case HTTP_UPDATE_FAILED:
Serial.printf("Update failed! - %s", ESPhttpUpdate.getLastErrorString().c_str());
Serial.println();
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("Latest firmware is already installed!");
Serial.println();
break;
case HTTP_UPDATE_OK:
Serial.println("Update complete - rebooting!");
Serial.println();
delay(2000);
ESP.Restart();
break;
}
}
Is there a known problem using a 3M SPIFFS partition? I am going to try a 1M partition (which is not big enough for my application) to see if that somehow works. Maybe there is bug that wipes out the 1st 2M or something?
I use the browser OTA method rather than the ESPhttpUpdate.update method so there may be some difference there.