From e7a153f5846fe94f1e402be03bc56aadf327545f Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:09:19 +0530 Subject: [PATCH] [Silabs] Adding disconnect on factory reset and OTA rename to multi ota (#34098) * adding disconnect on factory reset and OTA rename * Restyled by prettier-markdown * modifying the md files as addressed * replacing the ota_multi_image_tool to ota_image_tool --------- Co-authored-by: Restyled.io --- scripts/tools/silabs/ota/README.md | 2 +- .../ota/{ota_image_tool.py => ota_multi_image_tool.py} | 0 src/platform/silabs/ConfigurationManagerImpl.cpp | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) rename scripts/tools/silabs/ota/{ota_image_tool.py => ota_multi_image_tool.py} (100%) diff --git a/scripts/tools/silabs/ota/README.md b/scripts/tools/silabs/ota/README.md index d30dd458f10e1c..d0c1bd39e068cd 100644 --- a/scripts/tools/silabs/ota/README.md +++ b/scripts/tools/silabs/ota/README.md @@ -21,7 +21,7 @@ This is a wrapper over standard `ota_image_tool.py`, so the options for `create` are also available here: ``` -python3 ./scripts/tools/silabs/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 50000 -vs "1.0" -da sha256 +python3 ./scripts/tools/silabs/ota/ota_multi_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 50000 -vs "1.0" -da sha256 ``` followed by \*_custom options_- and a positional argument (should be last) that diff --git a/scripts/tools/silabs/ota/ota_image_tool.py b/scripts/tools/silabs/ota/ota_multi_image_tool.py similarity index 100% rename from scripts/tools/silabs/ota/ota_image_tool.py rename to scripts/tools/silabs/ota/ota_multi_image_tool.py diff --git a/src/platform/silabs/ConfigurationManagerImpl.cpp b/src/platform/silabs/ConfigurationManagerImpl.cpp index 5ebf349c15484b..9454367d3bf030 100644 --- a/src/platform/silabs/ConfigurationManagerImpl.cpp +++ b/src/platform/silabs/ConfigurationManagerImpl.cpp @@ -283,6 +283,11 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) PersistedStorage::KeyValueStoreMgrImpl().ErasePartition(); #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + sl_status_t status = wfx_sta_discon(); + if (status != SL_STATUS_OK) + { + ChipLogError(DeviceLayer, "wfx_sta_discon() failed: %lx", status); + } ChipLogProgress(DeviceLayer, "Clearing WiFi provision"); wfx_clear_wifi_provision(); #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION