M-Som Network Standby Sleep

Testing out some sleep scenarios with my M404, and I am having some issues when I try to sleep with network standby.

Looking at the sleep docs, I see the note where Wake on network is not supported on the P2, Photon 2, M-SoM.

I'm not looking to wake from network, but I would like to keep the modem on while sleeping. For instances when we would be publishing quicker than every 10 minutes.

So I am trying to implement
.network(NETWORK_INTERFACE_CELLULAR, SystemSleepNetworkFlag::INACTIVE_STANDBY);

However the following sleep calls do not put the M-Som to sleep:

SystemSleepConfiguration config;
config.mode(SystemSleepMode::STOP)
      .network(NETWORK_INTERFACE_CELLULAR);
      .duration(10min);
System.sleep(config);
SystemSleepConfiguration config;
config.mode(SystemSleepMode::STOP)
      .network(NETWORK_INTERFACE_CELLULAR, SystemSleepNetworkFlag::INACTIVE_STANDBY);
      .duration(10min);
System.sleep(config);
SystemSleepConfiguration config;
config.mode(SystemSleepMode::ULTRA_LOW_POWER)
      .network(NETWORK_INTERFACE_CELLULAR);
      .duration(10min);
System.sleep(config);
SystemSleepConfiguration config;
config.mode(SystemSleepMode::ULTRA_LOW_POWER)
      .network(NETWORK_INTERFACE_CELLULAR, SystemSleepNetworkFlag::INACTIVE_STANDBY);
      .duration(10min);
System.sleep(config);

HIBERNATE works as expected (obviously no network standby during HIBERNATE)

    SystemSleepConfiguration config;
    config.mode(SystemSleepMode::HIBERNATE)
        .duration(60min);
    System.sleep(config);

Is there no option to keep the modem connected while sleeping with the M-Som?

Basically .network(NETWORK_INTERFACE_CELLULAR) can't be specified on RTL872x. Your use case makes sense, but you can't do that because it will fail validation of the sleep configuration and not go to sleep. There is no way to keep the cellular modem connected in sleep, unfortunately.

2 Likes

So best option is to stay awake if sleeping less than 10 mins, so we don't get kicked off the network from too many reconnects?

Yes, that's really the only option.

2 Likes