Go Down

Topic: wifi101 -- gettime does not work with static address (Read 365 times) previous topic - next topic

usdave

any reason we can't use a static address and gettime() together?

CORRECTION: gettime() always returns a zero if a WiFi.config(ip) is called prior to the WiFi.begin()

usdave

the answer is that the .config must also include the DNS.  I was using just the ip, but adding the DNS (I used 8.8.8.8) solved the problem.

usdave

I should also add that the gateway and subnet must also be specified on the .config() to make gettime() work even though the .config() documentation indicates that they are optional and have defaults. 

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy