Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: matter: disable mpsl before preforming factory reset #19696

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions samples/matter/common/src/app/fabric_table_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <lib/support/logging/CHIPLogging.h>

#include "app/group_data_provider.h"
#include <mpsl/mpsl_lib.h>

#ifdef CONFIG_CHIP_WIFI
#include <platform/nrfconnect/wifi/WiFiManager.h>
Expand Down Expand Up @@ -57,10 +58,14 @@ class AppFabricTableDelegate : public chip::FabricTable::Delegate {
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
chip::DeviceLayer::ThreadStackMgr().ClearAllSrpHostAndServices();
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
/*/ Disable mpsl before start removing settings to improve the performance. */
mpsl_lib_uninit();
/* Erase Matter data */
chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().DoFactoryReset();
/* Erase Network credentials and disconnect */
chip::DeviceLayer::ConnectivityMgr().ErasePersistentInfo();
/*/ Re-enable mpsl after clearing persistent data. */
mpsl_lib_init();
#ifdef CONFIG_CHIP_WIFI
chip::DeviceLayer::WiFiManager::Instance().Disconnect();
chip::DeviceLayer::ConnectivityMgr().ClearWiFiStationProvision();
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ manifest:
- name: matter
repo-path: sdk-connectedhomeip
path: modules/lib/matter
revision: 20babbe7904f55511c39f19cae2162f7b770f974
revision: pull/527/head
west-commands: scripts/west/west-commands.yml
submodules:
- name: nlio
Expand Down
Loading