diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index c7394bc0d74d51..d367195c477f73 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -203,13 +203,12 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint ChipLogProgress(AppServer, "Rendezvous and secure pairing skipped"); SuccessOrExit(err = AddTestCommissioning()); } - else if (GetFabricTable().FabricCount() != 0) + else if ((DeviceLayer::ConnectivityMgr().IsWiFiStationProvisioned() || DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) && + (GetFabricTable().FabricCount() != 0)) { // The device is already commissioned, proactively disable BLE advertisement. ChipLogProgress(AppServer, "Fabric already commissioned. Disabling BLE advertisement"); -#if CONFIG_NETWORK_LAYER_BLE chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(false); -#endif } else {