These are chat archives for esp8266/Arduino

17th
Jan 2018
mega-hz
@mega-hz
Jan 17 2018 19:55
hello, does anyone know why my esp is still not with the fixed IP Adress?
// WiFi.config(ip, dns, gateway, subnet);
WiFi.mode(WIFI_STA);
IPAddress ip(192, 168, 2, 240); // where xx is the desired IP Address
IPAddress gateway(192, 168, 2, 1); // set gateway to match your network
IPAddress subnet(255, 255, 255, 0); // set subnet mask to match your
IPAddress dns(192, 168, 2, 1); // set dns


WiFi.begin(ssid, passwort);
Aaron N.
@porkyneal
Jan 17 2018 22:35
@mega-hz, you have just created variables to hold your IP details, need to use WiFi.config() to make them used.
ESP8266WiFiSTAClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1, IPAddress dns2)