Description
I managed to get the httpUpdate working except that it was crashing soon after writing out one line to the serial port.
My httpUpdate call is as follows:
t_httpUpdate_return ret = ESPhttpUpdate.update(host, port, url, currentver);
After comparing the process to the POST update example, I found that the _startAddress value in Updater.cpp was different between the WebUpdate example and the httpUpdate method.
In the POST method, the _startAddress was basically the existing sketch size and in the httpUpdate it was the remaining free space less the new sketch size.
After changing the Updater.cpp file as follows, it started working:
Line 74:
updateStartAddress = currentSketchSize ;//(WAS) updateEndAddress - roundedSize;
Why is the updateStartAddress different between the httpUpdate method and the WebUpdate POST example?
What would the correct fix be?
What a wonderful feature this OTA update is!!