You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm gone mad using static IP: time is not retrieved. After a while I've discovered that if you want to use static IP, you must explicit also DNS in the wifi config:
#define USE_STATIC_IP
// data used for static IP configuration:
#ifdef USE_STATIC_IP
IPAddress ip(192,168,1,38); // ip address you want to assign to your board
IPAddress gateway(192,168,1,1); // router address
IPAddress subnet(255,255,255,0); // subnet mask
IPAddress dns1(8,8,8,8); // dns 1
IPAddress dns2(8,8,4,4); // dns 2
#endif
// [...]
#ifdef USE_STATIC_IP
WiFi.config(ip,gateway,subnet,dns1,dns2);
#endif
WiFi.begin(ssid, password);
I think It's better include this snippet in the example for ESP8266.
Thank you for the library: it's the simplest one
The text was updated successfully, but these errors were encountered:
I'm gone mad using static IP: time is not retrieved. After a while I've discovered that if you want to use static IP, you must explicit also DNS in the wifi config:
I think It's better include this snippet in the example for ESP8266.
Thank you for the library: it's the simplest one
The text was updated successfully, but these errors were encountered: