diff --git a/sld407-matter-ota/02-ota-software-update.md b/sld407-matter-ota/02-ota-software-update.md index a8850a9..74c254f 100644 --- a/sld407-matter-ota/02-ota-software-update.md +++ b/sld407-matter-ota/02-ota-software-update.md @@ -174,17 +174,18 @@ For more information, see the documentation for the ota-provider-app example in ## Multi-Chip OTA Images -Multi-Chip OTA is implemented for EFR32 and SiWx917 NCP/SoC devices. Multi-chip OTA uses an enhanced script, ota_multi_image_tool.py, which creates .ota files that contain additional TLV headers. These TLV headers describe the binaries to be sent over the air. The enhanced script is located here. It is a wrapper to the original src/app/ota_image_tool.py. Multiple binaries can be packaged in the .ota file. Some tags are reserved for specific Silicon Labs binaries, and other tags are available to be used for arbitrary TLVs. The payloads can be encrypted. +Multi-Chip OTA is implemented for EFR32 and SiWx917 NCP/SoC devices. Multi-Chip OTA uses an enhanced script, ota_multi_image_tool.py, which creates .ota files that contain additional TLV headers. These TLV headers describe the binaries to be sent over the air. The enhanced script is located here. It is a wrapper to the original src/app/ota_image_tool.py. Multiple binaries can be packaged in the .ota file. Some tags are reserved for specific Silicon Labs binaries, and other tags are available to be used for arbitrary TLVs. The payloads can be encrypted. The script can be obtained from the Matter Extension github repository. For more information on creating a Multi-Chip .ota file, see the [README.md](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/silabs/ota/README.md). -Applications must be built with the OTA Multi Image Requestor component added to the project in Simplicity Studio to enable them to process the TLVs. +Applications must be built with the Multi-Chip OTA Image Requestor component added to the project in Simplicity Studio to enable them to process the TLVs. -The OTA Multi Image Requestor Encryption component should be added to the project if the requestor is meant to process encrypted payloads. +The Multi-Chip OTA Image Requestor Encryption component should be added to the project if the requestor is meant to process encrypted payloads. -**Combined OTA images are also supported:** +**Combined OTA Images in Regular and Multi-Chip OTA Implementations:** +Combined OTA images are supported in both regular OTA and Multi-Chip OTA implementations. These images can contain the bootloader, application, or both, depending on your upgrade scenario. 1. Bootloader + application upgrade. This requires a combined image. @@ -237,7 +238,7 @@ BootloaderInformation_t info Then, in the beginning of [OTAImageProcessorImpl::IsFirstImageRun](https://github.com/SiliconLabsSoftware/matter_sdk/blob/01a2d4aafaa0b124123caac067831809a1a86720/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp#L115), add: ```c++ -bootloader_getInfo(&info); // LINE ADDED: for Multi-OTA test +bootloader_getInfo(&info); // LINE ADDED: for Multi-Chip OTA test ChipLogProgress(SoftwareUpdate, "Bootloader version: 0x%lx\n", info.version); ChipLogProgress(SoftwareUpdate, "Bootloader type: %d\n", info.type); ``` diff --git a/sld407-matter-ota/03-firmware-upgrades.md b/sld407-matter-ota/03-firmware-upgrades.md deleted file mode 100644 index 8e9d123..0000000 --- a/sld407-matter-ota/03-firmware-upgrades.md +++ /dev/null @@ -1,134 +0,0 @@ -# Firmware Upgrades with Matter applications - -The Over The Air (OTA) Software Update functionality provides Wi-Fi firmware upgrades within the Matter environment. - -## Hardware Requirements - -- To run Matter OTA on Silicon Labs Platform, refer [Hardware Requirements](/matter/{build-docspace-version}/matter-prerequisites/hardware-requirements). - -## Software Requirements - -- To run Matter OTA on Silicon Labs Platform, refer [Software Requirements](/matter/{build-docspace-version}/matter-prerequisites/software-requirements). - -## Setting up OTA Environment - -- To run OTA on Matter over Wi-Fi, Need to build two different applications below: - - **OTA-A** is a normal application with default or older software version. It acts as **ota-requestor** where it needs to update latest software version. - - **OTA-B** is a normal application with updated software version. - - **Chip-tool** is a controller for sending commands to ota-requestor to update the software version and receiving commands from device. - - **OTA-Provider** is the server who has the latest software version and from which ota-requestor will download the updated software. - -### Setting up Chip-tool Controller - -If you have not downloaded or cloned this repository, you can run the following -commands on a Linux terminal running on either Linux machine, WSL or Virtual -Machine to clone the repository and run bootstrap to prepare to build the sample -application images. - -1. To download the [SiliconLabs Matter codebase](https://github.com/project-chip/connectedhomeip.git) run the following commands. - - ```shell - $ git clone https://github.com/project-chip/connectedhomeip.git - ``` - -2. Bootstrapping: - - ```shell - $ cd matter - $ ./scripts/checkout_submodules.py --shallow --recursive --platform efr32 - $ . scripts/bootstrap.sh - # Create a directory where binaries will be updated/compiled called `out` - $ mkdir out - ``` - - To control the Wi-Fi Matter Accessory Device you will have to compile and run the chip-tool on either a Linux, Mac or Raspberry Pi. The chip-tool builds faster on the Mac and Linux machines so that is recommended, but if you have access to a Raspberry Pi that will work as well. - -3. Build the chip-tool - - ```shell - $ ./scripts/examples/gn_build_example.sh examples/chip-tool out/standalone - ``` - -This will build chip-tool in `out/standalone`. - -### Setting up OTA-Provider - -- To Build OTA-Provider app in Linux Platform, Run below command in matter repository. - -```shell - scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false -``` - -### Building OTA Images Using Simplicity Studio - -- To create and build Matter OTA using Simplicity Studio, refer to the following link [build OTA application using studio](./05-build-ota-application-using-studio.md). - -## Executing OTA Scenario - -### Generating the OTA image - -1. Locate Simplicity Commander Path via **Command Prompt Terminal**. -2. Create a bootable image file by running below command in commander terminal(using the Lighting application image as an -example): - - ```shell - commander gbl create chip-efr32-lighting-example.gbl --compress lzma --app chip-efr32-lighting-example.s37 - ``` - - **Note**: Using LZMA compression when building the .gbl file ( passing `--compress lzma` parameter to the `commander gbl create` command) further reduces the downloaded image size. - -3. Create the Matter OTA file by running below command in **${WORKSPCAE_DIR}/matter** path: - -```shell - ./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 -``` - -**Note**: Modify **-vn** to **CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION** and **-vs** to **CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION** as per OTA-B application Building Step 10 in [Build OTA Images](./05-build-ota-application-using-studio.md). - -### Running OTA Provider - -- Locate **ota-provider** terminal start the Provider app passing to it the path to the Matter OTA file created in the previous step: - -```shell - rm -r /tmp/chip_* - ./out/debug/chip-ota-provider-app -f chip-efr32-lighting-example.ota -``` - -### Setting up OTA-Requestor - -- Before running **ota-requestor** app flash the bootloader binary images for Silicon Labs Devices. - -#### Flash Bootloader Images - -- Bootloader binaries will be flashed using Simplicity Commander only. It will support EFR32 NCP Boards only. -- Silicon Labs Devices will supports below Bootloader variants for EFR32 Boards. - - Internal Storage Bootloader - - External Storage Bootloader -- To Flash the Bootloader Binary along with the application for Silicon Labs Device, refer [Flashing Binaries](/matter/{build-docspace-version}/matter-wifi-run-demo/flashing-using-commander.md). - -### Running OTA-Requestor - -1. In a separate terminal, locate the chip-tool and ota-requestor and run the chip-tool commands to provision the Provider: - - ```shell - ./out/chip-tool pairing onnetwork 1 20202021 - ./out/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0 - ``` - -2. If the application device had been previously commissioned hold Button 0 for six seconds to factory-reset the device. - -3. In the chip-tool terminal, commission the Device by passing below command: - - ```shell - ./out/chip-tool pairing ble-wifi "node_id" "SSID" "PSK" 20202021 3840 - ``` - - where SSID and PSK are AP username and password. - -4. Once the commissioning process completes in the same terminal, run below requestor command to start downloading the image: - -```shell - ./out/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 -``` - -- The application device will connect to the Provider and start the image download. Once the image is downloaded the device will reboot into the downloaded image. diff --git a/sld407-matter-ota/04-ota-software-update-soc.md b/sld407-matter-ota/03-ota-software-update-soc.md similarity index 95% rename from sld407-matter-ota/04-ota-software-update-soc.md rename to sld407-matter-ota/03-ota-software-update-soc.md index 1360079..50024ce 100644 --- a/sld407-matter-ota/04-ota-software-update-soc.md +++ b/sld407-matter-ota/03-ota-software-update-soc.md @@ -143,15 +143,15 @@ Before running **ota-requestor** app, flash the **OTA-A** application(M4) and Wi ./chip-tool basicinformation read software-version 1 0 ``` -### Multi-OTA images for SiWx917 NCP/SoC +### Multi-Chip OTA images for SiWx917 NCP/SoC -Multi-OTA images can be created using `ota_multi_image_tool.py` which creates .ota files that contain additional TLV headers. +Multi-Chip OTA images can be created using `ota_multi_image_tool.py` which creates .ota files that contain additional TLV headers. >**Note**: SiWN917 NCP uses TLV tag 4 for Wi-Fi(TA) image upgrade. -#### Multi-OTA image creation on SiWN917 NCP +#### Multi-Chip OTA image creation on SiWN917 NCP -Multi-OTA on SiWN917 NCP supports application image upgrade, Wi-Fi(TA) image upgrade and combined image upgrade. +Multi-Chip OTA on SiWN917 NCP supports application image upgrade, Wi-Fi(TA) image upgrade and combined image upgrade. **Application Image Upgrade** @@ -177,7 +177,7 @@ commander gbl create SiWx917-lock-example.gbl --app SiWx917-lock-example.s37 --c ./scripts/tools/silabs/ota/ota_multi_image_tool.py create -v 0xFFF1 -p 0x8005 -vn 2 -vs "2.0" -da sha256 --app-input-file SiWx917-lock-example.gbl --wifi_ta_input_file SiWG917-B.2.14.5.0.0.10.rps combined_image.ota ``` -#### Multi-OTA image creation on SiWG917 SoC +#### Multi-Chip OTA image creation on SiWG917 SoC >**Note**: SiWG917 SoC uses TLV tag 1 for all image upgrades M4 alone, TA alone and combined image upgrade. diff --git a/sld407-matter-ota/05-build-ota-application-using-studio.md b/sld407-matter-ota/04-build-ota-application-using-studio.md similarity index 98% rename from sld407-matter-ota/05-build-ota-application-using-studio.md rename to sld407-matter-ota/04-build-ota-application-using-studio.md index a418a09..b472877 100644 --- a/sld407-matter-ota/05-build-ota-application-using-studio.md +++ b/sld407-matter-ota/04-build-ota-application-using-studio.md @@ -1,4 +1,4 @@ -# Building Matter applications for OTA Software Update +# Getting Started with OTA Updates in Matter Applications Using Simplicity Studio In the Matter OTA Software Update scenario, the running image (OTA-A) and the update image (OTA-B) are regular Matter application images and are built using the standard procedure. The only additional configuration required is the use of a higher software version in the update image. This page provides information about creation of OTA-A and OTA-B application for EFR32 and SiWx917 SOC Boards. diff --git a/sld407-matter-ota/index.md b/sld407-matter-ota/index.md index 437a1f8..67faa6a 100644 --- a/sld407-matter-ota/index.md +++ b/sld407-matter-ota/index.md @@ -4,5 +4,5 @@ The Over The Air (OTA) Software Update functionality is enabled by default for a - [**Matter OTA Bootloader**](./01-ota-bootloader.md) - [**Matter OTA Software Update**](./02-ota-software-update.md) -- [**Matter 917 SOC OTA Software Update**](./04-ota-software-update-soc.md) -- [**Matter OTA WiFi Project**](./05-build-ota-application-using-studio.md) +- [**Matter 917 SOC OTA Software Update**](./03-ota-software-update-soc.md) +- [**Matter OTA Project in Simplicity Studio**](./04-build-ota-application-using-studio.md)