I’ve just started working with a Boron LTE (I was previously working with an electron) and I’m using the new SystemSleepConfiguration on OS 2.0.0-rc1 and I can’t get my device to sleep for the given duration. I keep getting a
BY_NETWORK and I can see with the status led that it indeed turns back on after a second or two of sleeping (not the 30 or so seconds that I’m trying to get the device to sleep).
Here’s what I’m doing:
SystemSleepConfiguration sleep_config; sleep_config // STOP + NETWORK_INTERFACE_CELLULAR equivalent to SLEEP_NETWORK_STANDBY .mode(SystemSleepMode::STOP) .network(NETWORK_INTERFACE_CELLULAR) .duration(sleep_for * 1000) // in milliseconds // not used but must be specified .gpio(WKP, RISING); SystemSleepResult result = System.sleep(sleep_config);
I’m also using
I’m pretty sure I’m doing something wrong, but I’m having a hard time figuring it out as I’m debugging via serial so I think I might be missing the logs?
Is there any way to stop this from happening or check if all the network mesages have been processed before sleeping?
I just tried adding
.flag(SystemSleepFlag::WAIT_CLOUD) to the sleep config but this hasn’t helped.