|
| 1 | +# Copyright (c) 2025 Silicon Laboratories Inc. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +.. zephyr:code-sample:: siwx91x_otas |
| 5 | + :name: HTTP OTA Firmware Update on SiWx917 |
| 6 | + :relevant-api: wifi |
| 7 | + |
| 8 | + Demonstrates HTTP/HTTPS OTA firmware update using SiWx917 on Zephyr. |
| 9 | + |
| 10 | +Overview |
| 11 | +******** |
| 12 | + |
| 13 | +Application demonstrates how to perform HTTP/HTTPS OTA firmware updates on the |
| 14 | +SiWx917 platform using Zephyr RTOS. It connects to a Wi-Fi network, establishes |
| 15 | +a secure HTTPS connection using a CA certificate, and downloads firmware |
| 16 | +updates from a remote server. The application showcases secure connectivity and |
| 17 | +OTA update mechanisms for IoT devices. |
| 18 | + |
| 19 | +Requirements |
| 20 | +************ |
| 21 | + |
| 22 | +* SiWx917 development board with Wi-Fi support |
| 23 | +* HTTP server |
| 24 | + |
| 25 | +Configurations |
| 26 | +************** |
| 27 | + |
| 28 | +The following configurations can be modified in ``prj.conf``: |
| 29 | + |
| 30 | +* Wi-Fi Settings |
| 31 | + * ``CONFIG_OTA_WIFI_SSID`` - Network name |
| 32 | + * ``CONFIG_OTA_WIFI_PSK`` - Network password |
| 33 | + * ``CONFIG_OTA_IP_PROTOCOL_SELECTION`` - Select IPv4 or IPv6 |
| 34 | + * ``CONFIG_OTA_UPDATE_URL`` - OTA update URL |
| 35 | + |
| 36 | +.. _signed image generation: |
| 37 | + https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SIWX91X_SIGN_KEY |
| 38 | + |
| 39 | +Building and Running |
| 40 | +******************** |
| 41 | + |
| 42 | +1. Configure required settings |
| 43 | +2. Build and Flash |
| 44 | + |
| 45 | + .. code-block:: console |
| 46 | +
|
| 47 | + west build -b siwx917_rb4338a siwx917_ota -p |
| 48 | + west flash |
| 49 | +
|
| 50 | +3. Run HTTP/HTTPS server |
| 51 | + |
| 52 | +Test the Application |
| 53 | +******************** |
| 54 | + |
| 55 | +1. After flashing the SiWx91x, the device will scan for the specified AP and |
| 56 | + attempt to connect if found. |
| 57 | +2. Once connected, the SiWx91x will initiate an HTTP/S connection to the specified |
| 58 | + server and download the firmware binary. |
| 59 | +3. The OTA update process will be logged to the serial console. |
| 60 | + |
| 61 | +Note |
| 62 | +**** |
| 63 | + |
| 64 | +This application is not for production. |
0 commit comments