hutje
December 30, 2016, 4:19pm
1
Is it possible to connect my esp8266 to an external portforwarded server?
I’ve got my own local server, but I want to connect to this server from another network.
My server is port-forwarded so I can use the app from anywhere, but I want my microcontrollers to connect to this same server from another network.
This does not seem to work.
Blynk.begin(auth, "xxxxx", "xxxxx", IPAddress(xx,xx,xxx,xx)); *External IP*
hutje
December 30, 2016, 6:54pm
3
Yes. My blynk server has a static ip.
wiipro
December 30, 2016, 9:17pm
4
So set up dns for it then. www.ddns.net . Also check if u have opened HW ports.
Costas
December 30, 2016, 9:30pm
5
@wiipro as @hutje has a static ip then ddns wouldn’t be needed, just call the IP.
wiipro
December 30, 2016, 9:40pm
6
yes, but in my opinion ddns is more practical, as it is easier to remember and u didnt need to reflash code in case of IP change.
hutje
December 31, 2016, 7:56am
7
I can remember my external IP good enough. Only when I try to let my esp connect to my server at home, he can’t connect.
So for example, my external IP is 23.45.183.14 (it is fake) and my server has a static ip 192.168.1.107.
What do I need to type in the code?
I tried by using the external ip but then he got stuck by connecting to the blynk server.
Costas
December 31, 2016, 8:37am
8
@hutje have you forwarded the 3 required ports of 8443, 8442. 8441?
Then it is:
char server[] = "23.45.183.142"; // or "youpick.ddns"
Blynk.begin(auth, ssid, pwd, server);
wiipro
December 31, 2016, 8:39am
9
Blynk.begin(auth, "xxxxx", "xxxxx", "23.45.183.14");
try to do it like this. I’m using it in this way.
Also, if you want to save RAM do it like this:
#define SSID "ur_ssid"
#define PASS "ur_pass"
#define server "ur_ip"
Blynk.begin(auth, SSID, PASS, server);