Number of trails for electron network connection

Hi, I have setup my electron for deep sleep for specific intervals, but when it wakes up because the electron is in remote locations, sometimes it waits forever to connect for cellular connection. Is there any to set electron for sleep after a certain number of failures to connect to the cellular network?

Thanks

You may want to use SYSTEM_THREAD(ENABLED) to have your application firmware run in parallel and implement the timeout logic in your own code.
AFAIK there is no setting to force the device into sleep after certain retries - that would only be useful for a small subset of use-cases - so the actual behaviour in such cases should be handled by the application developer himself.

One thing you could set tho’ is to instruct the device to enter Listening/Setup Mode after several retries, but that has proven to be less usefull on battery driven devices.
https://docs.particle.io/reference/firmware/electron/#setlistentimeout-