I’m having issues with putting my electron into System.sleep(RI_UC, RISING, SLEEP_NETWORK_STANDBY);
and then using a SMS RI-UC to wake it from its sleep.
I have all SMS features working and can turn off/on a digital pins. What I want to do is SMS the electron to put it into Network_Standby which works fine. (this part works fine, well puts it into Newtwork standby mode anyway)
However when I send it an SMS to wake up it received the SMS and either does nothing and goes back to sleep or crashes and resets the electron. I would like it to wake up and stay away
What exactly do you mean by that?[quote=“ric_hard, post:4, topic:35122”]
Network sleep mode
[/quote]
With or without SLEEP_NETWORK_STANDBY in the System.sleep() call?
Also what sleep mode? Deep sleep won’t wake on SMS at all.
I have my Particle set up to turn a pin on and off via sms. works well. So now I want to send an sms to put it into Sleep Network Standby mode to reduce its current draw when I do not need to access it for a while. I then want to sent it a sms to wake it up and ultimately do what the sms says like turn off. hope that makes sense. here is the section of the code that I am trying to use to put it into low current mode.
if (smsProvided_Command == “lowcurrent”)
{
sendSMS(“Device has been switched to low power mode”, phoneReturn);
delay(2500);
// System.sleep(RI_UC, CHANGE, SLEEP_NETWORK_STANDBY);
waitUntil(Cellular.ready);
delay(9000);
sendSMS(“awake”, alertNumber);
return 1;
}
The particle enters that mode but when I send it a SMS it goes into SOS Hard fault and resets.
Thanks @ScruffR I located your example and once I ran it in the Loop rather then running via SMS it worked. I just use SMS to trigger a mode for example To Standby or not to standby.