Lines Matching +full:step +full:- +full:down
1 .. zephyr:code-sample:: updatehub-fota
2 :name: UpdateHub embedded Firmware Over-The-Air (FOTA) update
3 :relevant-api: updatehub
5 Perform Firmware Over-The-Air (FOTA) updates using UpdateHub.
10 UpdateHub is an enterprise-grade solution which makes it simple to remotely
12 Firmware Over-the-Air (FOTA) updates with maximum security and efficiency,
33 :zephyr:board:`Freedom-K64F <frdm_k64f>` kit using the ethernet connectivity. The
52 Zephyr sub-systems and it uses CoAP over UDP.
62 .. code-block:: console
68 Step 1: Build/Flash MCUboot
75 .. zephyr-app-commands::
78 :build-dir: mcuboot-frdm_k64f
82 Step 2: Start the UpdateHub Server
85 Step 2.1: UpdateHub-CE (Community Edition)
86 ------------------------------------------
88 The Zephyr sample application is configured by default to use the UpdateHub-CE
90 UpdateHub-CE is distributed as a docker container and can be on your local
92 To start using the UpdateHub-CE simple execute the docker command with the
95 .. code-block:: console
97 docker run -it -p 8080:8080 -p 5683:5683/udp --rm
98 updatehub/updatehub-ce:latest
100 Step 2.2: UpdateHub Cloud
101 -------------------------
103 The UpdateHub Cloud is an enterprise-grade solution. It provides almost same
104 resources than UpdateHub-CE with the DTLS as main diferential. For more
107 If you want to use the CoAPS/DTLS, simply add the ``overlay-dtls.conf`` when
112 .. code-block:: console
114 openssl genrsa -out privkey.pem 512
115 openssl req -new -x509 -key privkey.pem -out servercert.pem
121 .. code-block:: console
123 openssl x509 -in servercert.pem -outform DER -out servercert.der
124 openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in privkey.pem
125 -out privkey.der
134 ``overlay-prj.conf`` with option :kconfig:option:`CONFIG_UPDATEHUB_CE` equal ``n``.
137 Step 3: Configure UpdateHub Sample
144 value will select UpdateHub-CE otherwise ``n`` selects UpdateHub Cloud.
147 UpdateHub-CE server edition. If your are using a service provider a DNS name
148 is a valid option too. This option is only valid when using UpdateHub-CE.
155 UpdateHub-CE the valid is available at ``overlay-prj.conf.example`` file.
158 Step 4: Build UpdateHub App
162 More information about overlay files in :ref:`important-build-vars`.
169 Step 4.1: Build for Ethernet
170 ----------------------------
174 .. zephyr-app-commands::
175 :zephyr-app: samples/subsys/mgmt/updatehub
177 :build-dir: app
178 :gen-args: -DEXTRA_CONF_FILE=overlay-prj.conf
182 Step 4.2: Build for WiFi
183 ------------------------
185 For WiFi, it needs add ``overlay-wifi.conf``. Here a shield provides WiFi
189 .. zephyr-app-commands::
190 :zephyr-app: samples/subsys/mgmt/updatehub
192 :build-dir: app
193 :gen-args: -DEXTRA_CONF_FILE="overlay-wifi.conf;overlay-prj.conf"
199 The board disco_l475_iot1 is not supported. The es-WIFI driver currently
202 Step 4.3: Build for IEEE 802.15.4 [experimental]
203 ------------------------------------------------
205 For IEEE 802.15.4 needs add ``overlay-802154.conf``. This requires two nodes:
211 .. zephyr-app-commands::
212 :zephyr-app: samples/subsys/mgmt/updatehub
214 :build-dir: app
215 :gen-args: -DEXTRA_CONF_FILE="overlay-802154.conf;overlay-prj.conf"
219 .. zephyr-app-commands::
220 :zephyr-app: samples/subsys/mgmt/updatehub
222 :build-dir: app
223 :gen-args: -DEXTRA_CONF_FILE="overlay-802154.conf;overlay-prj.conf"
228 Step 4.4: Build for OpenThread Network [experimental]
229 -----------------------------------------------------
231 The OpenThread requires the ``overlay-ot.conf``. It requires two nodes:
233 validation needs a Linux kernel >= 4.9 with optional NAT-64 support. The
238 .. zephyr-app-commands::
239 :zephyr-app: samples/subsys/mgmt/updatehub
241 :build-dir: app
242 :gen-args: -DEXTRA_CONF_FILE="overlay-ot.conf;overlay-prj.conf"
247 Step 5: Sign the app image
259 .. code-block:: console
261 west sign -t imgtool -d build/app -- --version 1.0.0 --pad
262 --key bootloader/mcuboot/root-rsa-2048.pem
273 Step 6: Flash the app image
276 .. code-block:: console
278 west flash -d build/app --bin-file build/app/zephyr/zephyr.signed.bin
281 ``west flash -d build/app --hex-file build/app/zephyr/zephyr.signed.hex``
286 .. code-block:: console
288 minicom -D /dev/ttyACM0
291 Step 7: Signing the binary test image
298 .. code-block:: console
300 west sign --no-hex --bin -B build/zephyr-2.0.0.bin -t imgtool -d build/app --
301 --version 2.0.0 --key bootloader/mcuboot/root-rsa-2048.pem
309 signed bin: build/zephyr-2.0.0.bin
312 Step 8: Create a package with UpdateHub Utilities (uhu)
317 .. code-block:: console
319 pip3 install --user uhu
321 After installing uhu you will need to set the ``product-uid``. The value for
322 UpdateHub-CE can be found at ``overlay-prj.conf.example`` file. For UpdateHub
325 .. code-block:: console
331 .. code-block:: console
333 uhu package add build/zephyr-2.0.0.bin -m zephyr
337 .. code-block:: console
343 .. code-block:: console
345 uhu package archive --output build/zephyr-2.0.0.pkg
347 The remaining steps are dedicated to UpdateHub-CE. If you are using UpdateHub
351 Step 9: Add the package to server
355 URL, ``<your-ip-address>:8080``, and logging into the server using ``admin``
357 menu, then ``UPLOAD PACKAGE``, and select the package built in step 8.
360 Step 10: Register device on server
367 .. code-block:: console
375 be used to speed-up.
380 cases are server down, missing network routes and forget to change the
381 content of ``overlay-prj.conf`` file.
384 Step 11: Create a rollout
387 In the browser where the UpdateHub-CE is open, click on ``menu Rollout``
389 in step 9. With that, the update is published, and the server is ready to
393 Step 12: Run the update
399 .. code-block:: console
407 the board will reboot automatically and Step 13 can be skipped.
410 Step 13: Reboot the system
415 .. code-block:: console
424 .. code-block:: console
439 .. csv-table::
445 2, WIFI, :ref:`ESP-8266 <module_esp_8266>`
451 .. csv-table::
463 .. _OpenThread Router: https://openthread.io/guides/border-router