B524 seemingly wont connect after sleep

My B series module wont cellular connect after sleeping. My application runs as a FSM and wakes after a certain time to connect to the cellular network and cloud and publish its data. When it wakes up I call Cellular.on(), wait until modem is on, Particle.connect(), wait until connected, then go about the rest of the application. When initially flashing the device it will connect and run as it should do, but after it wakes up from sleep it gets stuck connecting(green flashing light) and gets caught in the connection timeout clause.
To get it to sleep I use the following config. (The previous application used a E310 module with SLEEP_MODE_DEEP and SLEEP_NETWORK_STANDBY flag and I’m trying to get the same functionality). The device can wake up on GPIO pins or by sleep timeout, which can vary from 0sec to 20 mins.
As an aside, am I setting the cellular flags correctly. Sleeping for less than 20 mins, have functionailty like NETWORK_STANDBY, and if greater than 20 mins turn network off completely(SLEPP_NETWORK_OFF in the E310).

 SystemSleepConfiguration config;  

    //If sleep seconds greater than network off time(20 mins), turn off, else be on standby 
    config.network(NETWORK_INTERFACE_CELLULAR, SystemSleepNetworkFlag::INACTIVE_STANDBY); 

    if (sleepCellular && sleepSeconds >= MIN_NETWORK_OFF_SECONDS) {
      config.network(NETWORK_INTERFACE_CELLULAR, SystemSleepNetworkFlag::NONE);
    } else {
      log.trace("...with network standby");
    //In here will have to append sleep config by each pin and edge 
    for (auto &input : wakeOnInputs) {
      config.gpio(input->pin, input->edge); 
    auto sleepStart = Clock::beforeSleep();
    if (log.isTraceEnabled()) {

    //System.sleep takes in ms as time 
    config.duration(sleepSeconds * TIME_PER_SECOND); 
    //Going to sleep
    SystemSleepResult result = System.sleep(config); 

My log during power down for sleep is the following:

0000026723 [app.syncPublishConnected] TRACE: Attempting publish...
0000027042 [app.syncPublishConnected] INFO: Published connected event
0000027042 [app.state.ModemControl] TRACE: Sync SyncPublishConnected complete
0000144201 [app.state.ModemControl] INFO: Transition: syncing -> disconnecting
0000144241 [system] INFO: Cloud: disconnecting
0000144241 [system] INFO: Cloud: disconnected
0000144242 [app.state.ModemControl] INFO: Transition: disconnecting -> turningOff
0000144245 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_UP
0000144246 [net.pppncp] ERROR: PPP error event data=5
0000157189 [mux] INFO: Stopping GSM07.10 muxer
0000157189 [mux] INFO: Gracefully stopping GSM07.10 muxer
0000157190 [mux] INFO: Closing all muxed channels
0000157190 [mux] INFO: Closing mux channel 1
0000157190 [mux] INFO: Closing mux channel 2
0000157191 [mux] INFO: Muxed channel 3 already closed
0000157191 [mux] INFO: Muxed channel 4 already closed
0000157192 [mux] INFO: GSM07.10 muxer thread exiting
0000157192 [mux] INFO: GSM07.10 muxer stopped
0000157194 [app.state.ModemControl] INFO: Transition: turningOff -> off
0000157195 [app.runner] TRACE: Ran all state machines, can sleep
0000157196 [app.runner] TRACE: Waking in 1041s for:
0000157196 [app.runner] TRACE: ModemControl.off
0000157196 [app.runner] TRACE: ...or if triggered by io.modeSwitchWKP
0000157197 [app.runner] TRACE: ...or if triggered by io.rain
0000157198 [app.runner] TRACE: ...or if triggered by io.flow
0000157198 [app.runner] TRACE: ...with network standby
0000157300 [system.nm] INFO: State changed: IFACE_UP -> IFACE_REQUEST_DOWN
0000157300 [system.nm] INFO: State changed: IFACE_REQUEST_DOWN -> IFACE_DOWN
0000157302 [system.nm] INFO: State changed: IFACE_DOWN -> DISABLED

Then when it wakes up it just tries to connect then times out. None of the logs from system.nm state changes happen.
Thanks in advance

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