-->
Page 1 of 2

ESP8266 WIFI CONNECTION QUESTION

PostPosted: Wed Dec 28, 2016 10:25 pm
by kirhim
Hi,

I made an iOS app to control led lights using esp8266. I have two issues.

1. My home ip address is some thing like 192.168.110.143. I tried the iOS app to control the led lights and it works well. But I notice that my ip changes frequently. So, say I try to do the same task the next day but it won't work because the ip changed to something like 192.168.110.50. Can I make my ip fixed? so it won't change.

2. I notice that in order to control led light using esp8266, my computer or device has to connect to the same wifi that I connected the esp8266. In this case, I have no problem controlling led light at home(when connected to the same wifi) but when I am away from home I am connected to a different wifi and I can't control my lights.

I would appreciate any comments. Thanks.

Please help :D

Re: ESP8266 WIFI CONNECTION QUESTION

PostPosted: Thu Dec 29, 2016 12:01 am
by gecko
kirhim wrote:1. My home ip address is some thing like 192.168.110.143. I tried the iOS app to control the led lights and it works well. But I notice that my ip changes frequently. So, say I try to do the same task the next day but it won't work because the ip changed to something like 192.168.110.50. Can I make my ip fixed? so it won't change.

What you need is a static ip address, usually a paid option that you have to take up with your ISP.

kirhim wrote:2. I notice that in order to control led light using esp8266, my computer or device has to connect to the same wifi that I connected the esp8266. In this case, I have no problem controlling led light at home(when connected to the same wifi) but when I am away from home I am connected to a different wifi and I can't control my lights.

Once you have a static ip address, you may then set your ISP modem/router to port forward to your ESP8266. This will allow you to access the ESP8266 from anywhere with Internet connection. There are a lot of tutorials out there for port forwarding. Apple Extreme routers ($$$) are the easiest, in my opinion.

Good luck.

Re: ESP8266 WIFI CONNECTION QUESTION

PostPosted: Thu Dec 29, 2016 10:27 am
by NOVAGENIO
This problem is the most typical of those who want to develop applications that connect to the internet.
To solve it you must configure your router, in the section LAN, to associate a fixed I to your mac address. This way, whenever you connect from your mobile device, it will assign the same IP. I can not tell you how, because all the routers are different. You can read your router's documentation or call your company's customer service telephone number, and they'll tell you there.

The second problem is why you should associate with your IP publishes a DNS resolution (DDNS.org) fixed and this way you can connect to your application from anywhere.

Re: ESP8266 WIFI CONNECTION QUESTION

PostPosted: Thu Dec 29, 2016 11:12 am
by NOVAGENIO
This problem is the most typical of those who want to develop applications that connect to the internet.
To solve it you must configure your router, in the section LAN, to associate a fixed I to your mac address. This way, whenever you connect from your mobile device, it will assign the same IP. I can not tell you how, because all the routers are different. You can read your router's documentation or call your company's customer service telephone number, and they'll tell you there.

The second problem is why you should associate with your IP publishes a DNS resolution (DDNS.org) fixed and this way you can connect to your application from anywhere.