Lines Matching +full:check +full:- +full:common +full:- +full:files
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
36 * The sample provides overlay files to enable other technologies like WIFI,
52 Zephyr sub-systems and it uses CoAP over UDP.
60 directory. This allows to construct and run everything from a common place.
62 .. code-block:: console
75 .. zephyr-app-commands::
78 :build-dir: mcuboot-frdm_k64f
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
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
117 The ``servercert`` and ``privkey`` files must be embedded in the application
119 the required ``der`` files:
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
128 The ``der`` files should be placed on the sample source at certificates
134 ``overlay-prj.conf`` with option :kconfig:option:`CONFIG_UPDATEHUB_CE` equal ``n``.
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.
161 In order to correctly build UpdateHub the overlay files must be use correctly.
162 More information about overlay files in :ref:`important-build-vars`.
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
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
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"
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"
251 will connect to UpdateHub server and check for new images. The image will be
252 loaded on the board with version 1.0.0. It is important check what file
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
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``
283 At this point you can access a third terminal ``terminal 3`` to check if image
286 .. code-block:: console
288 minicom -D /dev/ttyACM0
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
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
355 URL, ``<your-ip-address>:8080``, and logging into the server using ``admin``
367 .. code-block:: console
375 be used to speed-up.
379 able to reached the updatehub server for some reason. The most common
381 content of ``overlay-prj.conf`` file.
387 In the browser where the UpdateHub-CE is open, click on ``menu Rollout``
399 .. code-block:: console
403 And then wait. The board will probe the server, check if there are any new
415 .. code-block:: console
421 available`` will be printed on the terminal. You can check the newer version
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