mirror of https://github.com/meshcore-dev/MeshCore
Browse Source
Bluefruit's autoConnLed (on by default) drives LED_CONN. nRF52 SYSTEMOFF only halts the core and leaves GPIO outputs latched in their last drive state, so the BLE LED stayed lit through hibernation -- solid when a companion app was connected, or caught mid-blink while advertising. In the shared enterSystemOff() funnel, disable autoConnLed and stop advertising so BLE no longer drives the pin, then pull LED_CONN low with the polarity-aware ledOff() macro (respects each variant's LED_STATE_ON). This covers every board that hibernates through enterSystemOff() -- rak3401, rak4631 and xiao_nrf52 -- in one place. The Bluefruit calls are gated on the SoftDevice being enabled so the early low-voltage / boot-protect path (before Bluefruit.begin()) is safe; ledOff() always runs. Awake behavior is unchanged -- the LED still indicates BLE status. Note: promicro and rak_wismesh_tag call sd_power_system_off() directly rather than via enterSystemOff(), so they are not covered by this change. Co-Authored-By: Claude Opus 4.8 <[email protected]>pull/2662/head
1 changed files with 12 additions and 0 deletions
Loading…
Reference in new issue