electronicsguy / ESP8266

ESP8266 Projects
242 stars 183 forks source link

When using static ip it cant connect to host. #69

Closed Comahar closed 5 years ago

Comahar commented 5 years ago

When I try to set a static ip to esp it can't connect to host site which is script.google.com. If I put IPAddress ip(192, 168, 1, 230); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 255, 0); WiFi.config(ip, gateway, subnet); before WiFiMulti.addAP(ssid, password); it never connects to host(but it connects to wifi) and gets stuck at while(!client->connected()){ client->connect(host, 443); delay(500); } and I'm using WiFiMulti, maybe it is the problem.

electronicsguy commented 5 years ago

Hi,
I'm not sure since I haven't used static IP for this setup. Can you please try with another wifi network and check?