Bororn Sleep Mode with SystemSleepConfiguration not waking on Network

Hey I am testing out some logic when it comes to putting the Boron into sleep mode and according to the documentation it should wake on a function call but that doesnt seem to work. This is how I have it set up:

void loop() {
    if (millis()-lastOn > onMinutes*60*1000) {

        RGB.control(true);
        RGB.color(0, 0, 0);
                
        Particle.publish("status", "off", PRIVATE);
 
     
        config.mode(SystemSleepMode::STOP)
    	  .network(NETWORK_INTERFACE_CELLULAR)
          .flag(SystemSleepFlag::WAIT_CLOUD)
          .duration(offMinutes*60*1000);
 
        SystemSleepResult result = System.sleep(config);
        
        Particle.publish("status", "on", PRIVATE);
        
        RGB.control(true);
        RGB.color(0, 0, 128);
     
 
        // Remember when we published
        lastOn = millis();
    }
}

but when it is in sleep mode calling the function fails. Looking in the docs it says:

The first example configures the cellular modem to both stay awake and for the network to be a wake source. If incoming data, from a function call, variable request, subscribed event, or OTA request arrives, the device will wake from sleep mode.

but it fails, do I have it correctly configured for "wake on network"?

1 Like

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