Boron (BSoM) Disconnected but Doesn't Reboot Automatically - Manual Reboot Reconnects It

I had a remote device containing a BSoM disconnect from the Particle cloud recently, and there didn't seem to be a way to bring it back online remotely. After three days of being disconnected, the device was unplugged and plugged back in to power. The device quickly reconnected to the Particle cloud and seems to be operating normally now.

My question is why didn't the BSoM reboot itself when it was unable to reconnect for so long?

I have the following code in my setup():

if(!Particle.connected()) {"Connecting to Particle cloud");

And I realized that I don't call Particle.connect() anywhere else in my code

My first thought is to put another

if(!Particle.connected()) {"Connecting to Particle cloud");

in my publishing function, which would check if the device is connected (and try reconnecting if not connected) prior to trying to publish data every five minutes. However, I have seen other devices in my fleet disconnect and reconnect automatically before (from the connectivity events that are published), so I'm wondering if this code change is necessary and what the best practice should be.

What version of Device OS?

What as the status LED blinking before it was rebooted? Was it stuck in blinking green, blinking cyan, or off?


What is SYSTEM_MODE set to? If not set, it defaults to AUTOMATIC.

Calling Particle.connect() in AUTOMATIC mode won't do anything of use.

In SEMI_AUTOMATIC it won't do anything after the first time you've called it, unless you manually disconnected from the cloud. Reconnection is handled automatically.

What is your sleep mode behavior? If the device fails to connect to the cloud and you force sleep before 10 minutes of failure to connect, the modem may never be fully reset, which could cause it to fail to connect until powered down.

Unfortunately without a log it will be difficult to figure out what caused the device to not reconnect.

Device OS version 4.2.0

The BSoM was inside of a box and the LED isn't visible. I had to ask my customer to reboot the system since I'm far away, and they wouldn't have been able to check the LED status. I do have a status light on the box which basically just reflects the status of Particle.connected(), and that light was off when the system was rebooted.

SYSTEM_THREAD(ENABLED) - yes, it's enabled

I currently do not use any sleep functions

Would the BSoM have stored or published a log somewhere that I can access? Or is this something I would have needed to implement myself?

With that combination you only need the one call to Particle.connect(), probably in setup(). Reconnection will be handled automatically.

Unfortunately there is no built-in saved log of what caused the failure to connect, you'd need to save that from your own code.

Got it, thanks.

Would it hurt to call Particle.connect() again if Particle.connected() returns false? Or do you any other suggestions to help prevent this in the future?