I’ve implemented @zoltan-fedor’s fix here, which works well for the scenarios where the sim gets unplugged or the antenna comes off or the device gets kicked off the network during some maintenance.
However, it did not work for when an Electron of mine ran out of data. In this scenario the device ran out of data, then went into the flashing blue mode. I increased the data, but the device never reconnected, even though I could see it was cycling in and out of deep sleep mode.
Are there certain scenarios where the modem has to be power cycled beyond a deep sleep? I’m trying to decide if I need an external watchdog that can remove power from the electron for a period of time.
Also, is there a system event for this scenario? Right now I am using “setup_update”, but I am wondering if being rejected by the cell tower has a different firmware event.