[Solved] ESP8266 update firmware OTA?

Some of you have tested the firmware update of their ESP8266 by air?

I know it works in the same Wi-Fi network, but off the wifi network is that possible?

On remote location? Not that i am aware of, there are some tests with httpUpdate but i did not see any positive results on that either.

i’ve test this method OTA update over internet - Everything ESP8266 but no result… but it seems to work with guys.

This is interesting, i will try during the next weekend

Yheaa let me know your results !!!

Guys, maybe this can help: OTA Update · ESP8266 Arduino Core

I haven’t tried it, but it sure sounds promising…

yes i know local update, but i’m interesting with http update at the end of your doc. i never make it working

Not mine, just stumbled upon it… :slight_smile:

Here is another one: https://myelectronicslab.com/esp8266-ota-example-arduino-code-tutorial-air-update/

Thanks for this link, but i know to do that : it’s on wifi network. My wish is on another network, by internet with a http server

Hmmmm, AFAIK, that would be insecure, because ESP8266 can’t hold really complicated security to prevent unauthorized access and reflash by third person…

Other way is to reflash it by OTA and in “local” WiFi, but from platform which is ON THAT network - directly connected or on VPN access. That would make it a bit more secure (not bullet-proof, but better than straight access to bare ESP from Internet).

And, your ESP has public IP? How did you manage to do that? It is usual to have ESP connected to some router, and then with some kind of NAT connected to Internet… and by this method you have option to access it from anywhere… At least I can… Although I haven’t tried this Firmware-over-the-Air script, I guess it COULD be managed on router (I don’t think it is ESP’s fault).

httpupdate does not work that way, its not a push update.
ESP holds code with hardcoded web address and it checks periodicaly for a new file on that address.
So security depends on server side, not esp.


This is the begin of the story :

Hello there! Yes, we use OTA outside local network.
But you need a remote server to “put” updated sketch, and then point your code to find the server IP and check if there´s a new code there. If so, it updates the code over the air.
Complicated? Yeah, but if you guys want I can do a post explaining it step by step!
Regards from Brazil!


Viva o Brasil :wink:

Great news i think lot of us , use ESP8266 and are interested with OTA outside local network.

One question :
I have an account www.000webhost.com (free site hosting), can that be enough to store the .bin sketch (by filezilla for example), and then the ESP8266 will look, regularly, if there is a new code?

I saw that it was possible but without a positive result on my side.
On your side, did you try?

Regards from France!

That would be ok, only dissadvantage would be you need separate location for bin files in your weblocation for every device because of mqtt credentials and other differences.
device 1 www.000webhost.com/bin1
device 2 www.000webhost.com/bin2 etc

@guilherme could post code for solution they use.

I think first, update One device, will be a very good starting !
After , we could find solution for many other Devices (separate location for bin files, connect on a server …)

Agree on that, testing first :hammer::wrench::nut_and_bolt::nut_and_bolt:

1 Like

:star_struck: Show us what you are able de to :muscle:

Hello there!
Yes, it is enough! We use hostgator.com , the same service that holds our webpage www.gpstech.com.br, holds our bin files.
And that works =)

Actually not, Agro.
You can “store” MQTT credentials on Arduino EEPROM memories. Then your code only have to look on the server for the next version of the code.
Well, perhaps it is better if I add our code here =)
Give me a couple of hours and I will add the code here!