How Programming the nodeMCU Through OTA using GPRS?

Hi Everyone I need big help.

Actually, I m using NodemCU one of my project. the setup in Remote location, that place dont have a wifi option so I m using GPRS (GSM SIM800V) for sensor data collection to my server. right now I need to update my new firmware to that NodeMCU.

is it possible do a OTA using GPRS (GSM SIM800V)?

plz help for this.

Thanks in advance.


Yes, it is possible, but it takes some work on your part.

I recently had to implement OTA updates for the ESP32 over an RS-485 link, and it's actually pretty simple to manage. The hard part (for you) is the communication connection.

Performing an update (assuming the flash is already partitioned and set up right for OTA updates) is a case of "starting" the update, passing the update manager the flash data, then "ending" the update:

  1. Update.begin(size) - This starts the upgrade process. You need to provide the expected size of the flash data at this point.
  2. Update.write(*data, length) - Pass a block of flash data to the updater for writing. An alternative is to read directly from a Stream class, which will try and read the number of bytes specified in the size parameter to begin.
  3. Update.end() - This will finish it all off and switch the bootloader to load from the new flash. If it worked fine it will return true, otherwise, it will return false.

Assuming the above worked, you can no reset the board with ESP.restart()

For added security you can also pass an MD5 hash of the data to Update.setMD5(md5) and the updater will check that the uploaded data matches that MD5 hash.

Of course, all this needs implementing in your program that is running on the target device before you try and do any OTA updates. And, of course, you need to arrange the actual upgrade channel to get the commands and data through to the target in the first place.


  1. Implement a method of getting the data to the target
  2. Implement the updater code
  3. Go to the device and upgrade the firmware
  4. From that point on you should be able to use OTA updates through your own chosen mechanism.

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.