ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

Hang on "Querying pool.ntp.org..." #128

Closed kine90 closed 2 years ago

kine90 commented 2 years ago

Using M5core and LAN Module with W5500 (Ethernet2 library).

When calling waitForSync() the program hangs. Also if a timeout was specified, the serial debug was just printing Querying pool.ntp.org... and no timeout errors.

Solved modifying ezTime.cpp so that udp.flush() is called after udp.begin(NTP_LOCAL_PORT). Line 440 in func. void updateNTP() and 811 in func. bool Timezone::setLocation(const String location / = "GeoIP" /)

Now it works.