I have seen postings for similar problems, none have solved the issues completely. My project uses
DEEP-SLEEP and the devices are rebooting every minute (battery powered). During the setup process the device will sometimes connect to the Arduino IoT Cloud immediately, other times it won't connect for a few minutes. The device I'm using is a 8266, the WeMOS D1 mini. If I use the same code with a NANO 33 IoT, it always reconnects immediately. This is the code that stalls, a very common code.
while(ArduinoCloud.connected() != 1)
{
ArduinoCloud.update();
delay(500);
}
I've even substituted two other WeMOS devices hoping the it was bad device. But all of the WeMOS devices were unreliable. The WeMOS is cheep, low power, and physically small, this is why I chose it for my project. By the way, the remainder of the code works nicely once the connection is completed.
My question is, does anyone have a suggestion on how to get the 8266 to connect reliably to the Arduino IoT Cloud.