Stop preventing sleep on low battery for NRF52#7285
Conversation
|
What was happening is the node would not boot back up when sufficient power was applied, especially on a slowly rising level like you would get from a solar panel. Can you confirm this is not happening any more? |
@caveman99 This doesn't seem to be the expected behavior. The code tells the device to sleep for If you've witnessed a node wake from the low battery state, it was likely a router that woke up the next day to check the battery level rather than waking because of the battery level. With that in mind, I can confirm my WisBlock mini does not correctly wake after Perhaps allowing super deep sleep when |
|
Now we'll only allow super deep sleep if "Super Deep Sleep Seconds" is set to the default of This avoids the known deep sleep bug on NRF52 while preserving the intended behavior for most users. |
|
This was very problematic, can you verify this is not happening anymore? |
|
Please read my previous comment. The latest version of this PR should make the board freezing issue irrelevant. |
|
tested on my device,seems work |
|
Can this be merged please? This simple fix is far overdue for something that could prevent battery damage. At this point I've shipped 80+ devices with this PR cherrypicked to 2.6.11 with no issue, so I'm fairly confident it works as intended. |
|
@garthvh If you have an issue we can discuss it. Closing my PR without reading it is ridiculous. |
|
I think the missing bit of information here is that RAK boards are intended to wake from deep sleep when the battery power exceeds 3.7v, regardless of what super deep sleep seconds is set to. See https://forum.rakwireless.com/t/how-can-i-automatically-recovery-a-wisblock-box-from-a-low-battery-scenario/11352/3 for Bernd, a RAK engineer describing exactly the bug in question. |
|
@jp-bennett reading that thread it seems to imply there is a hardware issue rather than software. The current expected behaviour is to sleep X seconds regardless of what board is in use. In the case of solar nodes just set SDS seconds to any non max value (or one day as is the current default for routers) and the low battery sleep is bypassed avoiding freezing. On a side note, it seems strange to prioritize the uptime of solar nodes with undersized batteries/panels over the battery health and safety of all nodes. |
|
I'm running this changes (cherry-picked) on 2.6.11 latest beta on my heltecs T114 and rak4631 and everything runs fine |
…irmware into forkmaster Stop preventing sleep on low battery for NRF52 meshtastic#7285
|
I think that the hang you see not respecting SDS time is expected in a ROUTER node: The device sleeps only if TRACKER/SENSOR. Otherwise it's powered off and will only be powered back on user button press. |
|
@Joseph-DiGiovanni in this my PR (#7882) I do more than using the deep sleep, FYI. |
…irmware into forkmaster Stop preventing sleep on low battery for NRF52 meshtastic#7285
This PR removes code that inhibits low battery sleep on NRF52-based nodes. The "freezing" noted in the comment when it was added in 2022 is not well documented, or explained anywhere else as far as I can find.
More importantly, it doesn't appear to be happening anymore.It would seem to me that its not only safe, but necessary to remove this workaround and prevent batteries from over-discharging.EDIT: I've updated the PR to only avoid low battery sleep when necessary. See my update comment for details.
Fixes #4378
🤝 Attestations
Heltec (Lora32) V3N/ALilyGo T-DeckN/ALilyGo T-BeamN/AI've also tested this PR cherrypicked to the latest beta release (v2.6.11)