I’ve been trying to get my Arduino Uno WiFi Rev2 to speak with an NTP server. I am having a little trouble and wondered if anyone else has seen this before. I have tried to connect two ways to an NTP server.
I used my phone as a hotspot and connected to a time.nist.gov NTP server. Everything worked as expected as seen in the attached Gov time server.jpg.
I set a static IP, Subnet, and Gateway and logged into my network. There is a Linux NTP server on this network that others are using. The sketch will login to my network but it gives the Gateway I assigned when it gets to the WiFi.localIP print line. I think I remember reading an article a while ago about something like this but cannot find it now. The sketch will not receive any NTP packets and appears to hang right after Starting connection to server as you can see in the My Network.jpg. So is it assigning the correct IP address or is it really trying to use the Gateway IP as the IP address and that’s why I cannot receive any packets back?
Appreciate the help!
sketch_feb13a.ino (5.04 KB)