0

I'm working with esp8266 nodemcu-v1.0 .Now we are using OTA but the module may be disconnected from wifi so we need to use 2G by GSM Module(using beside nodemcu) to receive our new sketch to be uploaded to nodemcu. We will receive new sketch by GSM and save it in nodemcu flash memory using serial. But here is the problem: How can we upload the new sketch (saved in nodemcu flash memory) to nodemcu as its new firmware????

  • 2
    see ArduinoOTA source code or ESP8266httpUpdate source code – Juraj Apr 26 '18 at 9:26
  • can't find sth appropriate. – Seyed Mohammad Sadegh Jalalzad Apr 26 '18 at 10:17
  • 1
    Why can't you find sth appropriate? The sth are always appropriate. Bow down and worship your sth overlords! But seriously: everything you need is in the ArduinoOTA source code. You just need to pull out the appropriate bits. If you can't understand the code maybe you have bitten off more than you can chew with this project and you should do something more appropriate to your level, like blinking an LED. – Majenko Apr 26 '18 at 10:28
0

Use the Update singleton object. It is declared in Update.h. Example is ArduinoOTAClass::_runUpdate() in ArduinoOTA.cpp or ESP8266HTTPUpdate::runUpdate() in ESP8266httpUpdate.cpp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.