From 8ebab18ba632a2421c0968d82564c4dbac645cba Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Sun, 25 Jan 2026 05:22:12 +0300 Subject: [PATCH] feat(network): add WiFi power management config options Add two new fields to NetworkConfig: - wifi_on_external_power_only: automatically disable WiFi when running on battery - wifi_power_loss_timeout_secs: delay before disabling WiFi after power loss This enables automatic WiFi management based on power source, improving battery life for portable use while maintaining full connectivity when docked. Relates to: https://github.com/meshtastic/firmware/issues/9427 Co-Authored-By: Claude Signed-off-by: Aleksei Sviridkin --- meshtastic/config.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 649495e..66475cb 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -578,6 +578,20 @@ message Config { */ bool ipv6_enabled = 11; + /* + * Only enable WiFi when connected to external power (USB). + * WiFi will be automatically disabled when running on battery + * after wifi_power_loss_timeout_secs delay. + */ + bool wifi_on_external_power_only = 12; + + /* + * Delay in seconds before disabling WiFi after external power is lost. + * This allows for brief power interruptions without toggling WiFi. + * Default: 30 seconds. Set to 0 for immediate disable. + */ + uint32 wifi_power_loss_timeout_secs = 13; + /* * Available flags auxiliary network protocols */