@@ -201,6 +201,8 @@ void BaseApplicationDelegate::OnCommissioningSessionStarted()
201
201
202
202
#if SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
203
203
WifiSleepManager::GetInstance ().HandleCommissioningSessionStarted ();
204
+ // Setting the device to high power mode during commissioning
205
+ WifiSleepManager::GetInstance ().RequestHighPerformance ();
204
206
#endif // SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
205
207
}
206
208
@@ -210,6 +212,19 @@ void BaseApplicationDelegate::OnCommissioningSessionStopped()
210
212
211
213
#if SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
212
214
WifiSleepManager::GetInstance ().HandleCommissioningSessionStopped ();
215
+ // Removing the high power mode request on session stopped
216
+ WifiSleepManager::GetInstance ().RemoveHighPerformanceRequest ();
217
+ #endif // SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
218
+ }
219
+
220
+ void BaseApplicationDelegate::OnCommissioningSessionEstablishmentError (CHIP_ERROR err)
221
+ {
222
+ isComissioningStarted = false ;
223
+
224
+ #if SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
225
+ WifiSleepManager::GetInstance ().HandleCommissioningSessionStopped ();
226
+ // Removing the high power mode request on failed commissioning
227
+ WifiSleepManager::GetInstance ().RemoveHighPerformanceRequest ();
213
228
#endif // SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
214
229
}
215
230
@@ -240,6 +255,7 @@ void BaseApplicationDelegate::OnCommissioningWindowClosed()
240
255
#endif // QR_CODE_ENABLED
241
256
#endif // DISPLAY_ENABLED
242
257
}
258
+
243
259
}
244
260
245
261
void BaseApplicationDelegate::OnFabricCommitted (const FabricTable & fabricTable, FabricIndex fabricIndex)
@@ -946,6 +962,8 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
946
962
947
963
case DeviceEventType::kCommissioningComplete : {
948
964
#if SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
965
+ // DUT is commissioned, removing the High Performance request
966
+ WifiSleepManager::GetInstance ().RemoveHighPerformanceRequest ();
949
967
WifiSleepManager::GetInstance ().VerifyAndTransitionToLowPowerMode (WifiSleepManager::PowerEvent::kCommissioningComplete );
950
968
#endif // SL_WIFI && CHIP_CONFIG_ENABLE_ICD_SERVER
951
969
0 commit comments