Wi-Fi OTA Update Demo#

The Wi-Fi OTA firmware update demo demonstrates how to update the SiWx91x user application firmware over Wi-Fi connection, by downloading the image from a mobile phone.

  • The SiWx91x board connects as a TCP client to the mobile phone TCP update server.

  • From the Simplicity Connect mobile app TCP server, a firmware update is initiated, and the firmware image file is sent to the SiWx91x client.

  • The SiWx91x client’s OTA application, wifi_m4_firmware_update sample app, programs the user application firmware into the SiWx91x flash memory and reboots.

To set this up, the SiWx91x board and the mobile phone, running the Simplicity Connect app, need to be connected to the same wireless access point, as shown in the diagram below.

OTA firmware update diagram

Wi-Fi OTA Firmware Update Setup#

Make sure the mobile phone is connected to the local Wi-Fi network.

Then, open the Simplicity Connect app on the mobile phone, tap the Demo button in the navigation bar, find the Wi-Fi OTA Update demo tile, and tap to start it.

Wi-Fi OTA Update tile

When the demo begins, the Configure Wi-Fi OTA Server window opens. This window displays the IP address of the phone as a non-editable field, and port number that you can edit.

Configure Wi-Fi OTA Server

On the SiWx91x device side, the Wi-Fi OTA application needs to be programmed on the SiWx91x. From Simplicity Studio, create a project from the wifi_m4_firmware_update sample app, and update it per instructions in the Application Readme. Then, build, flash, and run on the SiWx91x device to establish communication with the TCP server through the local Wi-Fi network. Ensure that the firmware is updated with the correct server IP address, port number, and local Wi-Fi network's SSID and password per instructions in the Application Readme.

Once the server and client are configured, you can see status in the mobile app and in the SiWx91x UART log. You can choose the appropriate firmware file (*.rps) to upload to the device. You can download the corresponding *.rps for your Silicon Labs development board from the Silicon Labs GitHub site. After selecting the correct firmware file, tap Upload to begin uploading the firmware to the SiWx91x.

Server and client status updated

SiWx91x UART log

After tapping Update, a new dialog screen displays the progress of the firmware update. If the client hasn't connected to the TCP server, the Update Firmware window will show the message, waiting for client to connect. If the client is having trouble connecting to the mobile phone, try tapping the reset button on the SiWx91x board.

Waiting for client to connect message

When the TCP client on the SiWx91x connects to the TCP server on the mobile phone, the firmware file transfer begins automatically. The progress dialog shows the progress of the firmware update as a percentage, along with a status message, Firmware update in progress. It also displays the number of packets sent to the client. If needed, you can cancel the firmware update at any time during the process by tapping Cancel.

Cancel button

When the firmware file has been uploaded successfully, you see a status message, Firmware updated successfully in both the UART log and the mobile app. If for any reason, the client and server are disconnected during the firmware upload process, there is a 30-second timeout period to reconnect automatically. If they don't reconnect within this time frame, a timeout error dialog will appear, prompting you to cancel the firmware update.

UART log message

Mobile app message