Fix Heltec V4-R8 waking from hibernate on LoRa traffic - #3168
Open
notbucki wants to merge 1 commit into
Open
Conversation
Since c644720 UITask::shutdown() no longer puts the radio to sleep — that moved into the boards' powerOff(). HeltecV4R8Board::powerOff() however reused the wake-on-LoRa enterDeepSleep(), which keeps the FEM in RX and arms DIO1 as EXT1 wakeup, so any received packet rebooted the device within seconds. Shut the FEM down (latched) and use the base deep sleep: radio to sleep, no wakeup sources armed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
notbucki
force-pushed
the
fix/heltec-v4-r8-hibernate-wake
branch
from
August 10, 2026 17:02
67b5ac4 to
3841c1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3165
Since c644720 ("uitask: screen and radio poweroff moved to board") nothing puts the radio to sleep when a companion hibernates — that responsibility moved into the boards'
powerOff().HeltecV4R8Board::powerOff()however reuses the wake-on-LoRaenterDeepSleep(), which keeps the FEM in RX and arms EXT1 wakeup onP_LORA_DIO_1, so any received packet reboots the device within seconds of entering hibernate. Full analysis in #3165.This PR makes
powerOff()shut the FEM down (CSD low, PA rail off, both latched through deep sleep —LoRaFEMControl::init()already releases the holds on the next boot) and use the baseESP32Board::enterDeepSleep(0), which puts the radio to sleep and clears all wakeup sources. The wake-on-LoRaenterDeepSleep()remains unchanged for its intended use.Tested on a V4-R8 (OLED SKU): the device now stays in hibernate with active mesh traffic nearby; wake via the RST button works, normal operation after wake confirmed (BLE + RX).
🤖 Generated with Claude Code