setup: first-boot is Wi-Fi-only — Bluetooth off, opt-in afterwards

ble_en defaults ON, so a fresh device co-inits BLE at boot and the first-boot
setup ran with both radios up. On the fresh-flash path only (setupWizardMaybeOpen,
which returns early once setup is done) force BLE off + persist ble_en=0, before
the UI is interactive — so first-boot setup is Wi-Fi-only and the user opts BLE in
later via the control center. Already-set-up devices return early, so their BLE
state is untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kaj SchittecatandClaude Opus 4.8 committed 2026-06-14 16:26:23 +02:00
1 parent 2a93779d75
commit beb85bd391
1 file changed
+10
+10
View File
@@ -19445,6 +19445,16 @@ static void setupWizardOpen() {
// Called once at the end of UITask::begin: show the wizard on a fresh flash.
static void setupWizardMaybeOpen() {
if (touchPrefsGetSetupDone()) return;
// First-boot setup is Wi-Fi-only: force Bluetooth OFF and persist the choice so
// it stays off after setup too — the user opts BLE in later via the control
// center. BLE co-inits at boot from the default-on pref; tear it down here,
// before the UI is interactive, so the user only ever sees Wi-Fi during setup.
// (Already-set-up devices return above, so their BLE state is left untouched.)
#if defined(ESP32)
wifiConfigSetBleEnabled(false);
if (g_lv.task && g_lv.task->hasBleCapability() && g_lv.task->isBleEnabled())
g_lv.task->disableBle();
#endif
setupWizardOpen();
}