Shutdown Cellular w/ SYSTEM_THREAD(ENABLED)

I’ve heard tales tangentially in another thread that Cellular.off() doesn’t work as expected with SYSTEM_THREAD(ENABLED). Is there an officially endorsed work around? I just tried running a sketch that does (per a piece of the suggestions in the aforementioned thread):

  Cellular.on();
  delay(10000);
  Cellular.command("AT+CPWROFF\r\n");

… and it seems to eventually go from breathing cyan to flashing green on the RGB LED sometime later (not immediately). Can someone explain this in a little more detail as to why it’s needed?

Revising… it should go to breathing white when cellular is off according to the docs… maybe I’m not succeeding after all.

Re-revising… now I’m seeing breathing green… hm.

This doesn’t exactly answer your question, but this post has examples involving deep sleep, and the comments in the last code example talk about the difficulties with Cellular.off() and threading. It’s not that it doesn’t work, but it probably doesn’t work like you think it would.

1 Like

@vicatcu Here is why the cellular AT commands are needed when using system threading: