JAndrassy / ArduinoOTA

Arduino library to upload sketch over network to Arduino board with WiFi or Ethernet libraries
GNU Lesser General Public License v2.1
437 stars 89 forks source link

Must new sketch handle next ota upload? #115

Closed HsimWong closed 2 years ago

HsimWong commented 2 years ago

Thanks you @jandrassy for your contribution. I have successfully uploaded the new sketch to my ESP8266 board via ota, while I failed to upload another one after the first uploading. I guess that this is because the OTA connection needs to be re-handled in the uploaded sketch. I am currently having the following questions I hope you can help with:

  1. Is the OTA handler written in flash or memory?
  2. If the 1st question is answered as in memory, would it be possible to solidify it in the flash?
  3. What can I do to enable the board to keep receiving new programs without including the OTA handler in every new sketch?
JAndrassy commented 2 years ago

I am not sure if you use this library or that bundled with the esp8266 boards support package, but for both the updated binary is stored in flash (RAM is much smaller than the binary) and the sketch handles the upload.