- Sat May 20, 2017 3:53 am
It is not really very complicated, but involves some steps that are router dependend so I can only give you the general outlines.
I am doing the same using ESP-Basic.
Now ESP-Basic generally uses port 80 for communication with the outside world.
So that means that any command you send to the ESP (or from the ESP) is coming from the following local IP adress
now your local IP adress is not available from the outside world.
You can only find your global ip adress.
You can find that by pointing your web-browser at:http://whatismyipaddress.com/
Now you have to dig into the setting pages from your router.
Look at something calledport-forwarding.
There open a new port for the outside world.
In my router I have to give it a name. Next I give it the IP adress of the ESP and the ESP's port number which is 80.
Next I instruct it to send all communication from router port no 8081 to the ESP's port.
The router will most likely ask for a starting port number and an ending port number for your local and global ports. In both cases use the same. So Start local 80, end local 80, start global 8085 and end global 8081. You can use many numbers for 8081 but there are some restrictions. This allows you to open many specific ports for all kinds of projects.
That is it.
Now the only thing left is to instruct your app or whatever you are using to crontrol the ESP to send or get the info from:http://www.YYY.YYY.YYY.YYY:8081
The YYY part is off course the global internet adress
Be aware however that opening a port in your router might bring some security issuses as you are opening your router to the world.
This way I have controlled my ESP from my work or many adresses on hollidays be it from a ESP-Web-page or a dedicated App adressing the ESP.
I am devellopping my apps with MIT Appinventor which is dead-easy.
I will be publishing some stories about writing dedicated apps for your ESP on my weblog shortly.http://lucstechblog.blogspot.nl/