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

[Silabs] Adding disconnect on factory reset and OTA rename to multi ota #34098

Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions docs/guides/silabs_efr32_software_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ all of the EFR32 example applications.

- Create the Matter OTA file from the bootable image file:

./src/app/ota_image_tool.py create -v 0xFFF1 -p 0x8005 -vn 2 -vs "2.0" -da sha256 chip-efr32-lighting-example.gbl chip-efr32-lighting-example.ota
./src/app/ota_multi_image_tool.py create -v 0xFFF1 -p 0x8005 -vn 2 -vs "2.0" -da sha256 chip-efr32-lighting-example.gbl chip-efr32-lighting-example.ota

- In a terminal start the Provider app passing to it the path to the Matter
OTA file created in the previous step:
Expand Down Expand Up @@ -101,8 +101,8 @@ OTA Software Update process the Software Version parameter that the .ota file
was built with must be greater than the
CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION parameter set in the application's
`CHIPProjectConfig.h` file. The Software Version parameter is set by the `-vn`
parameter passed to the `ota_image_tool.py create` command. For example, if the
application's running image was built with
parameter passed to the `ota_multi_image_tool.py create` command. For example,
if the application's running image was built with
CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION set to 1 and if the `.ota` file is
built with `-vn 2` then the Provider will serve the update image when requested.

Expand Down
6 changes: 3 additions & 3 deletions scripts/tools/silabs/ota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ thus the `OTAImageProcessorImpl` instance should take this into account.

## Usage

This is a wrapper over standard `ota_image_tool.py`, so the options for `create`
are also available here:
This is a wrapper over standard `ota_multi_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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def create_image(args: object):

def main():
"""
This function is a modified version of ota_image_tool.py main function.
This function is a modified version of ota_multi_image_tool.py main function.

The wrapper version defines a new set of args, which are used to generate
TLV data that will be embedded in the final OTA payload.
Expand Down
5 changes: 5 additions & 0 deletions src/platform/silabs/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading