Just wanted to share a discovery. For the quick context, we’re using (testing) the asset tracker with the added feature of scanning surrounding BLE tags. Base hardware is similar to Tracker-1/Protoboard and firmware is based on tracker edge firmware.
What happens is, when device loses its connection and has no GPS location available, it ends never going to sleep. Thing is, we pause the normal sleep process to be able to get our scan results, and then resume it, but at the time of resuming sleep, device was saying that the date to wake at passed to wakeAtMilliseconds was in the past. Since it was mostly
System.millis() + something it didn’t make much sense. But then digging deeper into the code, I realized that the issue was the last location not being refreshed that was forcing a wake interval of 0.
Quick solution was to initialize the last location timestamp to Time.now(), then device went to sleep again normally. This may have side effects, so I’ll be investigating further…
So, conclusion so far is: if your tracker never goes to sleep check it has either a connection (and cell/wifi location enabled) or a gps positioning. Missing both will prevent it from sleeping.