From 5d4b15745072b9462c2db9fe863555e1ecf2e716 Mon Sep 17 00:00:00 2001 From: iranl Date: Fri, 28 Nov 2025 20:45:40 +0100 Subject: [PATCH] Fix Hosted BLE deinit/init --- src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 744cd11..470db66 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -832,7 +832,10 @@ void restartServices(bool reconnect) if(lockEnabled || openerEnabled) { - Log->println("Restarting BLE Scanner"); + #if defined(CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE) || defined(CONFIG_ESP_WIFI_REMOTE_ENABLED) + hostedInitBLE(); + #endif + Log->println("Restarting BLE Scanner"); bleScanner = new BleScanner::Scanner(); bleScanner->initialize("NukiHub", true, 40, 40); bleScanner->setScanDuration(0); @@ -893,10 +896,6 @@ void restartServices(bool reconnect) Log->println("Starting web server done"); } } - - #if defined(CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE) || defined(CONFIG_ESP_WIFI_REMOTE_ENABLED) - hostedInitBLE(); - #endif } #endif