Bug Report
Description
When flashing the Detector firmware on a Heltec WiFi LoRa 32 V4, battery voltage is always reported as 0 V (battery_v: 0), even with a healthy LiPo battery connected to the standard battery connector.
Root Cause
The default sdkconfig.detector example in the documentation ships with:
CONFIG_BATEAR_BOARD_HELTEC_V3=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
Even though the inline comment reads:
Board (use HELTEC_V4 + FLASHSIZE_16MB for V4)
When the firmware is built with HELTEC_V3, the VBAT monitoring logic targets the wrong GPIO/ADC configuration for the V4 hardware (GPIO1 / ADC1_CH0 gated by GPIO37 / ADC_Ctrl). The result is a 0 V reading on every telemetry packet.
Steps to Reproduce
- Use a Heltec WiFi LoRa 32 V4 board.
- Copy the default
sdkconfig.detector example from the docs without modifying the board selection.
- Build and flash the Detector firmware.
- Observe
battery_v: 0 in telemetry output despite a connected and charged battery.
Expected Behavior
battery_v should reflect the actual battery voltage (e.g., 3.82), and a low-battery flag should trigger when voltage drops below 3.4 V.
Proposed Fix
Update the default sdkconfig.detector example (or add a clear V4-specific block) to use:
CONFIG_BATEAR_BOARD_HELTEC_V4=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
Environment
- Board: Heltec WiFi LoRa 32 V4
- Firmware role: Detector
- Batear version: v2.2.0
- Battery: LiPo connected to standard SH1.25 battery connector
- Solar input: SH1.25 solar panel interface (V4-specific feature)
Bug Report
Description
When flashing the Detector firmware on a Heltec WiFi LoRa 32 V4, battery voltage is always reported as
0 V(battery_v: 0), even with a healthy LiPo battery connected to the standard battery connector.Root Cause
The default
sdkconfig.detectorexample in the documentation ships with:CONFIG_BATEAR_BOARD_HELTEC_V3=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
Even though the inline comment reads:
Board (use HELTEC_V4 + FLASHSIZE_16MB for V4)
When the firmware is built with
HELTEC_V3, the VBAT monitoring logic targets the wrong GPIO/ADC configuration for the V4 hardware (GPIO1 / ADC1_CH0 gated by GPIO37 / ADC_Ctrl). The result is a 0 V reading on every telemetry packet.Steps to Reproduce
sdkconfig.detectorexample from the docs without modifying the board selection.battery_v: 0in telemetry output despite a connected and charged battery.Expected Behavior
battery_vshould reflect the actual battery voltage (e.g.,3.82), and a low-battery flag should trigger when voltage drops below 3.4 V.Proposed Fix
Update the default
sdkconfig.detectorexample (or add a clear V4-specific block) to use:CONFIG_BATEAR_BOARD_HELTEC_V4=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
Environment