diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 5d1e574fe97c34..eaea53d90ec00d 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -374,11 +374,6 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement() } #endif // CONFIG_NETWORK_LAYER_BLE - if (mAppDelegate != nullptr) - { - mAppDelegate->OnCommissioningWindowOpened(); - } - if (mUseECM) { mWindowStatus = AdministratorCommissioning::CommissioningWindowStatus::kEnhancedWindowOpen; @@ -388,6 +383,11 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement() mWindowStatus = AdministratorCommissioning::CommissioningWindowStatus::kBasicWindowOpen; } + if (mAppDelegate != nullptr) + { + mAppDelegate->OnCommissioningWindowOpened(); + } + // reset all advertising, switching to our new commissioning mode. app::DnssdServer::Instance().StartServer();