Skip to content

Commit

Permalink
Fix address of NTP server in example
Browse files Browse the repository at this point in the history
For some reason the example failed to get a response from the IP address of `time.nist.gov`. I also didn't get a ping reply from that address to my laptop.
I had more luck with one of the servers of `pool.ntp.org`.
For the record I'm located in Amsterdam, Netherlands. Does this new address work in US and other parts of the world?
  • Loading branch information
egueli authored Jun 11, 2021
1 parent 16deaaf commit 572fee5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ int keyIndex = 0; // your network key index number (needed only for W

unsigned int localPort = 2390; // local port to listen for UDP packets

IPAddress timeServer(129, 6, 15, 28); // time.nist.gov NTP server
IPAddress timeServer(162, 159, 200, 123); // pool.ntp.org NTP server

const int NTP_PACKET_SIZE = 48; // NTP timestamp is in the first 48 bytes of the message

byte packetBuffer[ NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets
byte packetBuffer[NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets

// A UDP instance to let us send and receive packets over UDP
WiFiUDP Udp;
Expand Down

0 comments on commit 572fee5

Please sign in to comment.