diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index e4db190c507608..9a32401bc7a47d 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -343,9 +343,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) if (GetFabricTable().FabricCount() != 0) { +#if CONFIG_NETWORK_LAYER_BLE // 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 }