Safemode? What does it do

Hi There

I’m trying to harden my code from weirdness, on many occasions the devices are unable to be flashed OTA, it keeps timing out. however I am able to send function calls no problem.

I have implemented a function call that puts the device into safemode. however it is not clear what safe mode is.

The documentation helpfully states…
Resets the device and restarts in safe mode.

I would like to know:

  1. Does it connect to the cloud in safe mode.
  2. Does this work with a 3rd party SIM
  3. Does any application code run
  4. Can our application code detect it is in safemode.
  5. Can we run some minimal code that services our external WDT, and sets the APN
  6. Is there any description of what it does anywhere.

Thanks Marshall

Something like this?

To fill in the gaps

  1. is answered in the docs
  2. Yes, 3rd party SIMs will be supported as long the APN was set in the application firmware prior entering Safe Mode and no power-down of the cellular module has taken place since - just Particle.keepAlive() may not be applied correctly when entering Safe Mode after a reset due to a bug in the system framework
  3. is answered in the docs
  4. see answer to 3
  5. see answer to 3
  6. obviously :wink:
1 Like

thanks, I hadn’t seen that.