Skip to content

Repeater auto reboot - #3742

Open
peter-aandahl wants to merge 3 commits into
meshcore-dev:mainfrom
peter-aandahl:repeater_auto_reboot
Open

peter-aandahl wants to merge 3 commits into
meshcore-dev:mainfrom
peter-aandahl:repeater_auto_reboot

Conversation

@peter-aandahl

Copy link
Copy Markdown

Summary

Improves long-term stability for unattended ESP32 repeaters by adding an optional periodic auto-reboot setting, a hardware watchdog timer, and a clean 5-second peripheral/radio power-down before esp_restart().

Changes

  1. Configurable auto_reboot CLI setting (src/helpers/CommonCLI.h, src/helpers/CommonCLI.cpp, examples/simple_repeater/main.cpp):
    • Adds set auto_reboot <hours> (0–8760) and get auto_reboot commands to CommonCLI, persisted in NodePrefs.
    • Defaults to 0 (off), preserving existing behavior unless explicitly enabled.
    • Tracks uptime in examples/simple_repeater/main.cpp using 64-bit millisecond accumulation (immune to the 49.7-day millis() rollover).
  2. 5-Second Peripheral & SX1262 Hardware Reset on ESP32Board::reboot() (src/helpers/ESP32Board.h, src/helpers/ESP32Board.cpp, variants/heltec_v4/HeltecV4Board.cpp):
    • Pulls P_LORA_RESET low, disables PIN_VEXT_EN (and powers down the Heltec V4 GC1109 FEM PA / peripheral rails via periph_power), and waits 5 seconds (feeding the WDT) before calling esp_restart() so the SX1262 and external peripherals cold-reset cleanly.
  3. 60-Second ESP32 Hardware Task Watchdog (src/helpers/ESP32Board.h):
    • Initializes a 60-second esp_task_wdt in ESP32Board::begin() and feeds it in ESP32Board::loop() to recover automatically if the main loop ever hangs.
  4. PlatformIO merge-bin.py fixes (merge-bin.py):
    • Avoids importing non-existent projenv when running -t nobuild -t upload.
    • Quotes file paths passed to esptool.py merge_bin so workspace paths containing spaces do not fail.

@HougeDK

HougeDK commented Nov 7, 2026

Copy link
Copy Markdown

please also for NRF boards

This branch has not been deployed

No deployments
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.

2 participants