Skip to content

Commit

Permalink
Update Active Mode during commissioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Dec 7, 2022
1 parent b149561 commit f568da0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/app/server/CommissioningWindowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ void CommissioningWindowManager::ResetState()
mECMIterations = 0;
mECMSaltLength = 0;

#if CHIP_DEVICE_CONFIG_ENABLE_SED
DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(false);
#endif

UpdateWindowStatus(CommissioningWindowStatus::kWindowNotOpen);

UpdateOpenerFabricIndex(NullNullable);
Expand Down Expand Up @@ -223,10 +227,7 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE()
mPairingSession.Clear();

#if CHIP_DEVICE_CONFIG_ENABLE_SED
if (!mIsBLE && !mListeningForPASE)
{
DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(true);
}
#endif

ReturnErrorOnFailure(mServer->GetExchangeManager().RegisterUnsolicitedMessageHandlerForType(
Expand Down Expand Up @@ -455,13 +456,6 @@ CHIP_ERROR CommissioningWindowManager::StopAdvertisement(bool aShuttingDown)
{
RestoreDiscriminator();

#if CHIP_DEVICE_CONFIG_ENABLE_SED
if (!mIsBLE && mListeningForPASE)
{
DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(false);
}
#endif

mServer->GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::PBKDFParamRequest);
mListeningForPASE = false;
mPairingSession.Clear();
Expand Down

0 comments on commit f568da0

Please sign in to comment.