WIO Terminal rpc WiFi Testing

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

Hi @jasea

Thanks for spotting this out, we will take a look at this and fix the bug :smiley: Will also keep you updated

Hi @jasea

We have found and fixed the bug. This was caused by the udp.begin() function not closing the previous sockets properly. Please update your rpcWiFi library to the latest version :smiley:

Thank you for a very prompt fix. I have tested the fix for over 20 NTP updates to prove that the original po]roblem has also been solved by the rpcWiFi update.
Regards
John

1 Like

That’s good to hear :smiley: