Skip to content

Fix telemetry config save ordering before BLE deinit#10549

Open
mokjpn wants to merge 1 commit into
meshtastic:developfrom
mokjpn:codex/telemetry-config-save-order-upstream
Open

Fix telemetry config save ordering before BLE deinit#10549
mokjpn wants to merge 1 commit into
meshtastic:developfrom
mokjpn:codex/telemetry-config-save-order-upstream

Conversation

@mokjpn
Copy link
Copy Markdown

@mokjpn mokjpn commented May 25, 2026

Summary

Fix telemetry module config save ordering on ESP32-class devices by deferring BLE deinit until after telemetry config is saved.

fixes #10548

What changed

In AdminModule::handleSetModuleConfig():

  • exclude meshtastic_ModuleConfig_telemetry_tag from the early disableBluetooth() path
  • call disableBluetooth() for telemetry only after saveChanges(SEGMENT_MODULECONFIG, shouldReboot)

Why

On affected devices, telemetry settings enabled from the app could revert after reboot because BLE was being torn down before the module config had been persisted to /prefs/module.proto.

In failing logs, the config flow reached:

  • Client set module config
  • Disable bluetooth until reboot

but did not reliably complete the telemetry save path first.

This change keeps the existing reboot behavior but moves BLE teardown later for telemetry config updates so the config is saved before reboot.

Scope

This PR is intentionally narrow:

  • telemetry module config only
  • no change to MQTT / Serial / StatusMessage handling
  • no change to telemetry runtime logic

Testing

Tested on:

  • Arduino Nesso N1 / ESP32-C6

Observed:

  • before this change, some devices reverted telemetry to disabled after reboot
  • after this change, telemetry remained enabled after reboot

Build tested:

  • pio run -e arduino-nesso-n1

@github-actions github-actions Bot added the bugfix Pull request that fixes bugs label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry config can revert after reboot on ESP32-C6 when BLE is disabled before save

1 participant