Arduino Cloud Connection problem

I have 6 Uno R4 wifi devices that have been in service for over 6 months with no significant
issues. Starting Sept 13 the devices/things have been unable to connect to the cloud. As a test I configured a new Uno R4 wifi device/thing and uploaded the default web editor code. When the device/thing attempts to connect to the Arduino IoT Cloud I get the following error via the Serial Monitor:

MQTT Broker: iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 0.4.1
Connected to "xxxxxxxxxxxx"
ArduinoIoTCloudTCP::handle_SyncTime could not get valid time. Retrying now.
ArduinoIoTCloudTCP::handle_SyncTime could not get valid time. Retrying now.
ArduinoIoTCloudTCP::handle_SyncTime could not get valid time. Retrying now.

repeating continuously...

Any ideas what is happening?
Thanks in advance...

Try searching for handle_SyncTime on the forum, that sounds familiar.

Hi @DeputyDan this can be related to this issue "ArduinoIoTCloudTCP::handle_SyncTime could not get valid time" caused by timezone diffrence ¡ Issue #506 ¡ arduino-libraries/ArduinoIoTCloud ¡ GitHub do you mind check if this pr fixes your issue?

Thanks

Hi @pennam , if I understand the pr correctly it has to do with timezones ahead of UTC due to compiletime using local time. I am located in the United States Central Time Zone -> UTC -5 so I don't think it applies to my situation. As a test I uploaded code to my test device at various times during the day. It made no difference to the outcome.

Please note that I'm receiving a slightly different serial monitor error message today. Note I did change setDebugMessageLevel to 4. It now reads:

***** Arduino IoT Cloud - configuration info *****
Device ID: b418996b-08c8-48cb-xxxx-xxxxxxxxxxxx
MQTT Broker: iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 0.4.1
Connected to "Millerosa"
TimeServiceClass::getRemoteTime cannot get time from NTP, fallback on connection handler
TimeServiceClass::getRemoteTime cannot get time from connection handler
ArduinoIoTCloudTCP::handle_SyncTime could not get valid time. Retrying now.
TimeServiceClass::getRemoteTime cannot get time from NTP, fallback on connection handler
TimeServiceClass::getRemoteTime cannot get time from connection handler
ArduinoIoTCloudTCP::handle_SyncTime could not get valid time. Retrying now.
TimeServiceClass::getRemoteTime cannot get time from NTP, fallback on connection handler
TimeServiceClass::getRemoteTime cannot get time from connection handler
ArduinoIoTCloudTCP::handle_SyncTime could not get valid time. Retrying now.
etc...

Thanks

@DeputyDan Thanks for the test, it looks like your board can't connect to the NTP server to get the time. Is there a firewall in your network? Is UDP communication allowed?

Thank you for your suggestions. I don’t have a firewall and I wasn’t blocking UDP in my router so I emailed my ISP to see if they were blocking UDP. I haven’t gotten a reply but my devices ‘mysteriously’ started working shortly after I sent the email. I’m guessing the ISP did something to block UDP.

Everything seems to be working now! Thank you again.

1 Like

:sob:

Happy that is working now!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.