<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Internet of Things | Academic OSS ELC</title><link>https://academic-oss-elc.netlify.app/tags/internet-of-things/</link><atom:link href="https://academic-oss-elc.netlify.app/tags/internet-of-things/index.xml" rel="self" type="application/rss+xml"/><description>Internet of Things</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Wed, 01 Jul 2020 00:00:00 +0000</lastBuildDate><image><url>https://academic-oss-elc.netlify.app/images/icon_hu0b7a4cb9992c9ac0e91bd28ffd38dd00_9727_512x512_fill_lanczos_center_2.png</url><title>Internet of Things</title><link>https://academic-oss-elc.netlify.app/tags/internet-of-things/</link></image><item><title>Software Update (OTA) for Zephyr</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/software-update-ota-for-zephyr-parthiban-nallathambi-linumiz/</link><pubDate>Wed, 01 Jul 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/software-update-ota-for-zephyr-parthiban-nallathambi-linumiz/</guid><description>&lt;blockquote>
&lt;p>Zephyr devices can be connected in two possible (direct and in-direct) ways to the internet. Directly using Modem/WiFi/Ethernet medium or in-directly via local radio through Gateways like Linux. Upgrading such Zephyr system in the field is a complex task and must be robust, secure.&lt;/p>
&lt;p>This talk will details various possible update solutions available like UpdateHub, Hawkbit, SWUpdate for Zephyr. Using a NXP FRDM-K64F board as an example, we will discuss and demo different possible ways for updating Zephyr system.&lt;/p>
&lt;/blockquote>
&lt;h2 id="agenda">Agenda&lt;/h2>
&lt;ul>
&lt;li>McuBoot&lt;/li>
&lt;li>Updatehub&lt;/li>
&lt;li>mcumgr&lt;/li>
&lt;li>ZUpdate&lt;/li>
&lt;li>ZUpdate -Hawkbit&lt;/li>
&lt;li>Future work&lt;/li>
&lt;/ul>
&lt;h3 id="linux-vs-zephyra">Linux vs Zephyra&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>on linux it handles both download and install&lt;/p>
&lt;/li>
&lt;li>
&lt;p>for zephyr this is split into two&lt;/p>
&lt;ul>
&lt;li>download handled by application&lt;/li>
&lt;li>install is handled by MCUBoot&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>First we focus on download.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Then we look at install&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="mcuboot">MCUBoot&lt;/h2>
&lt;ul>
&lt;li>Bootloader for Zephyr and mynewt&lt;/li>
&lt;li>integrity and security check&lt;/li>
&lt;li>multi image boot support&lt;/li>
&lt;li>softwre update heavy lifting&lt;/li>
&lt;/ul>
&lt;p>MCUBoot Memory Layout&lt;/p>
&lt;ul>
&lt;li>NXP Freedom kit&lt;/li>
&lt;/ul>
&lt;pre>&lt;code class="language-javascript">chosen {
zephyr,code-partition = &amp;amp;slot0_partition;
};
&amp;amp;flash0 {
partitions {
compatible = &amp;quot;fixed-partitions&amp;quot;;
#address-cells = &amp;lt;1&amp;gt;;
#size-cells = &amp;lt;1&amp;gt;;
boot_partition: partition@0 {
label = &amp;quot;mcuboot&amp;quot;;
reg = &amp;lt;0x00000000 0x00010000&amp;gt;;
read-only;
};
slot0_partition: partition@20000 {
label = &amp;quot;image-0&amp;quot;;
reg = &amp;lt;0x00020000 0x00060000&amp;gt;;
};
slot1_partition: partition@80000 {
label = &amp;quot;image-1&amp;quot;;
reg = &amp;lt;0x00080000 0x00060000&amp;gt;;
};
scratch_partition: partition@e0000 {
label = &amp;quot;image-scratch&amp;quot;;
reg = &amp;lt;0x000e0000 0x00020000&amp;gt;;
};
};
};
&lt;/code>&lt;/pre>
&lt;p>Paritions&lt;/p>
&lt;ul>
&lt;li>Mcuboot&lt;/li>
&lt;li>slot0&lt;/li>
&lt;li>slot1&lt;/li>
&lt;li>scratch&lt;/li>
&lt;/ul>
&lt;p>MCUBoot operation&lt;/p>
&lt;ul>
&lt;li>conditions: Interrupt swap, request swap, valid image&lt;/li>
&lt;li>Video from Youtube&lt;/li>
&lt;/ul>
&lt;p>MCUBoot swap&lt;/p>
&lt;ul>
&lt;li>swap status
&lt;ul>
&lt;li>three stage operation&lt;/li>
&lt;li>slot1 to slot0&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>API&lt;/p>
&lt;ul>
&lt;li>image confirmed&lt;/li>
&lt;li>write image&lt;/li>
&lt;li>request upgrade&lt;/li>
&lt;li>erase&lt;/li>
&lt;/ul>
&lt;p>Live share&lt;/p>
&lt;pre>&lt;code class="language-sh">west flash -d ./frdm_mcuboot/
&lt;/code>&lt;/pre>
&lt;h2 id="software-update">Software Update&lt;/h2>
&lt;h3 id="updatehub">Updatehub&lt;/h3>
&lt;ul>
&lt;li>What is it?&lt;/li>
&lt;li>Polling Mode&lt;/li>
&lt;li>Manual mode&lt;/li>
&lt;li>Community vs Enterprise&lt;/li>
&lt;/ul>
&lt;p>Live Share&lt;/p>
&lt;pre>&lt;code class="language-sh">~/work/west/native/zephyr/samples/net/updatehub
west flash
~/work/west/native/zephyr/samples/net/updatehub
west flash -bin-file ./build/zephyr/zephyr-signed.bin
&lt;/code>&lt;/pre>
&lt;p>Web UI&lt;/p>
&lt;ul>
&lt;li>Overview&lt;/li>
&lt;li>Devices&lt;/li>
&lt;li>Pakcages&lt;/li>
&lt;li>Rollouts&lt;/li>
&lt;/ul>
&lt;p>Each rollout has&lt;/p>
&lt;ul>
&lt;li>UID, version, hardware&lt;/li>
&lt;/ul>
&lt;h3 id="mcumgr">MCUmgr&lt;/h3>
&lt;ul>
&lt;li>Management library for Zephyr and mynewt&lt;/li>
&lt;li>OS and hwardware agnostic&lt;/li>
&lt;/ul>
&lt;p>Layered modular design&lt;/p>
&lt;ul>
&lt;li>1: img_mgmt,fs_mgmt,log_mgmt,os_mgmt&lt;/li>
&lt;li>2: mgmt&lt;/li>
&lt;li>3: SMP&lt;/li>
&lt;li>4: BLuetooth, Shell, UDP&lt;/li>
&lt;/ul>
&lt;p>Reference Screenshots&lt;/p>
&lt;ul>
&lt;li>STM32 target initial slot list&lt;/li>
&lt;li>Uploading the OTA image via the Bluetooth interface&lt;/li>
&lt;li>STM32 target initial slot list after OTA push&lt;/li>
&lt;/ul>
&lt;h3 id="zupdate-architecture">ZUpdate architecture&lt;/h3>
&lt;ul>
&lt;li>Configuration Manager&lt;/li>
&lt;li>ZUpdate Core&lt;/li>
&lt;li>Download Handler
&lt;ul>
&lt;li>Hawkbit&lt;/li>
&lt;li>updatehub&lt;/li>
&lt;li>SWUpdate&lt;/li>
&lt;li>Custom&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>StorageHandler
&lt;ul>
&lt;li>SPI NOR&lt;/li>
&lt;li>FLash&lt;/li>
&lt;li>MMC&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Low-Level Comm
&lt;ul>
&lt;li>BLE&lt;/li>
&lt;li>WiFI&lt;/li>
&lt;li>LoRa&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item></channel></rss>