As established by @ScruffR here:
Particle.connect();
if (waitFor(Particle.connected, 60000)) {
// connection established within 60 seconds
// procede
}
else {
// no connection
// act appropriately depending on your use case
}
is an elegant means of establishing whether or not a cellular device is connected, with a sufficiently long timeout, in MANUAL
mode.
However, the question of what action to take upon that else
condition is contingent upon both your use case and, more importantly, the type of connectivity error you may be experiencing. A reset may be sufficient in some cases, but I’m curious to learn why your device is unable to sustain its cloud connection.