Initiating shipping mode on Monitor One while blocked on Particle.connect()

What is the proper way to initiate shipping mode for Monitor One devices that are trying to get cellular connectivity? I am trying to enable shutting down the device when it doesn't have service.

How to reproduce the issue:

  • Disconnect the cellular antenna
  • Turn on the device
  • While the device is connecting, try to turn off the device using the user button
    -> device resets with RESET_REASON_POWER_MANAGEMENT as the reset reason.

Some background-- we use shipping mode as the default "OFF" state. When turning off our devices we give the device five seconds to send a publish that indicates the device was put to sleep by a user. After five seconds, we go to sleep even if the publication isn't ACKd so a user never has to wait around for our device to go to sleep. We use the default SYSTEM_MODE and SYSTEM_THREAD(ENABLED);

It looks like the Particle.connect() code blocks application code from running (such as looking at the button and trying to turning off the device if it's pressed) .

Thanks for your help!

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