diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 01da805f31611b..b58a0aa68bceec 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -299,7 +299,12 @@ CHIP_ERROR OpenEnhancedCommissioningWindow(uint16_t commissioningTimeoutSeconds, ReturnErrorOnFailure(gDeviceDiscriminatorCache.UpdateDiscriminator(discriminator)); - gAdvDelegate.SetBLE(false); +// TODO: Do not turn on BLE when opening the Enhanced Commissioning Window. +#if CONFIG_NETWORK_LAYER_BLE + gAdvDelegate.SetBLE(true); + params.SetAdvertisementDelegate(&gAdvDelegate); + params.SetBleLayer(DeviceLayer::ConnectivityMgr().GetBleLayer()).SetPeerAddress(Transport::PeerAddress::BLE()); +#endif // CONFIG_NETWORK_LAYER_BLE params.SetPASEVerifier(verifier).SetAdvertisementDelegate(&gAdvDelegate); ReturnErrorOnFailure(