Arduino OTA update failed due to "Not Enough space"
Posted: Tue Jan 15, 2019 4:18 pm
Hi, I'm trying to do an OTA update of my ESP8266 generic module (12F) by downloading the BIN from my local web server but it fails due to "Not enough space" as stated by my serial debug:
This outputs:
HTTP_UPDATE_FAILD Error (-100): Not Enough space[HTTP]
My ESP supposedly have 4Mb of flash storage and my BIN is around 400K, and in fact this is confirmed by the HTTP header sent to my HTTP server:
What is weird to me is that chip size is 4Mb, sketch size is 430Kb but the free space is just 69Kb... What I'm missing?
Code: Select all
t_httpUpdate_return ret = ESPhttpUpdate.update("192.168.1.53", 80, "/", "1.0.0");
switch(ret) {
case HTTP_UPDATE_FAILED:
Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("[update] Update no Update.");
break;
case HTTP_UPDATE_OK:
Serial.println("[update] Update ok."); // may not called we reboot the ESP
break;
}
This outputs:
HTTP_UPDATE_FAILD Error (-100): Not Enough space[HTTP]
My ESP supposedly have 4Mb of flash storage and my BIN is around 400K, and in fact this is confirmed by the HTTP header sent to my HTTP server:
'x-esp8266-free-space': '69632',
'x-esp8266-sketch-size': '430336',
'x-esp8266-sketch-md5': '87b87905f3d5c46975cee3b15e751166',
'x-esp8266-chip-size': '4194304',
'x-esp8266-sdk-version': '3.0.0-dev(c0f7b44)',
'x-esp8266-mode': 'sketch'
What is weird to me is that chip size is 4Mb, sketch size is 430Kb but the free space is just 69Kb... What I'm missing?