А если так :
IPAddress ip(192, 168, 1, 25); //static IP address
IPAddress ip_gate(192, 168, 1, 1);
IPAddress ip_subnet(255, 255, 255, 0);
IPAddress ip_dns1(8, 8, 8, 8);
IPAddress ip_dns2(8, 8, 4, 4);
WiFi.mode(WIFI_STA);
WiFi.config(ip, ip_gate, ip_subnet, ip_dns1, ip_dns2);
WiFi.begin...