Skip to content

Fix Heltec V4-R8 waking from hibernate on LoRa traffic - #3168

Open
notbucki wants to merge 1 commit into
meshcore-dev:devfrom
notbucki:fix/heltec-v4-r8-hibernate-wake
Open

Fix Heltec V4-R8 waking from hibernate on LoRa traffic#3168
notbucki wants to merge 1 commit into
meshcore-dev:devfrom
notbucki:fix/heltec-v4-r8-hibernate-wake

Conversation

@notbucki

@notbucki notbucki commented Aug 10, 2026

Copy link
Copy Markdown

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-LoRa enterDeepSleep(), which keeps the FEM in RX and arms EXT1 wakeup on P_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 base ESP32Board::enterDeepSleep(0), which puts the radio to sleep and clears all wakeup sources. The wake-on-LoRa enterDeepSleep() 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

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
notbucki force-pushed the fix/heltec-v4-r8-hibernate-wake branch from 67b5ac4 to 3841c1a Compare August 10, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant