In the AT WiFi environment the WIO Terminal NTP RTC example would only run for about 10 NTP update requests before failing when it called udp.parsePacket().
I deleted all of the Arduino IDE files, downloaded the latest version of the IDE. I downloaded the latest versions of the rpc library’s and ran the AT WiFi version of NTP RTC test program after changing the #include definitions . Unfortunatley it failed after only one NTP server update. So I then tried the rpc WiFi test program wioTerm_ntp.ino from https://github.com/Seeed-Studio/Seeed_Arduino_Sketchbook/tree/master/examples I had to make the following changes before it would compile.
Line 31: change #include <RTClib.h> to #include “RTC_SAMD51.h”
Line 64: change RTC_DS3231 rtc; to RTC_SAMD51 rtc;
Line 94 to Line 101 Comment out section dealing with RTC battery
After it compiled it still only ran for one NTP update before failing as can be seen from the following serial console output.
Connecting to WiFi network: BT-SMA6Q9
Waiting for WIFI connection…
Connected.
SSID:
IP Address: 192.168.1.100
signal strength (RSSI):-49 dBm
udp packet received
RTC time is: 2000-01-01T00:00:00
RTC (boot) time updated.
Adjusted RTC (boot) time is: 2020-11-08T14:32:38
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Failed to get time from network time server.
Regards John