-->
Page 1 of 2

Setup Fixed IP [Solved]

PostPosted: Mon Apr 27, 2015 6:15 pm
by MegaKing
How can i set the IP to be fixed?

Using the AT commands it was AT+CIPSTA=192.168.1.77

Thanks

Re: Setup Fixed IP

PostPosted: Mon Apr 27, 2015 7:53 pm
by Davy
I haven't tried with the esp yet but on arduino you would use WiFi.config
ESP8266WiFi.cpp has void ESP8266WiFiClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet)

So, I'm guessing that this should work:
Code: Select allIPAddress ip(192, 168, 0, 177); 
IPAddress gateway(192, 168, 0, 1); 
IPAddress subnet(255, 255, 255, 0); 
WiFi.config(ip, gateway, subnet);

Re: Setup Fixed IP

PostPosted: Thu Apr 30, 2015 2:57 pm
by Sunspot
I added the code above with my numbers to the example HelloServer in various ways but although it ran it still got a DHCP address.
I guess something else needs changing.

Help much appreciated .

Re: Setup Fixed IP

PostPosted: Thu Apr 30, 2015 3:48 pm
by ArnieO