| |
| |
| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| |
| |
| |
| <title>Over-the-Air Image Upgrade — Apache Mynewt latest documentation</title> |
| |
| |
| |
| |
| <link rel="shortcut icon" href="../../_static/mynewt-logo-only-newt32x32.png"/> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> |
| |
| |
| <link rel="stylesheet" href="../../_static/css/sphinx_theme.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../_static/css/bootstrap-3.0.3.min.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../_static/css/v2.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../_static/css/restructuredtext.css" type="text/css" /> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../_static/css/overrides.css" type="text/css" /> |
| <link rel="index" title="Index" |
| href="../../genindex.html"/> |
| <link rel="search" title="Search" href="../../search.html"/> |
| <link rel="top" title="Apache Mynewt latest documentation" href="../../index.html"/> |
| <link rel="up" title="Remote Device Management" href="devmgmt.html"/> |
| <link rel="next" title="Sensors" href="../sensors/sensors.html"/> |
| <link rel="prev" title="Enabling Newt Manager in Your Application" href="add_newtmgr.html"/> |
| |
| |
| <script src="../../_static/js/modernizr.min.js"></script> |
| |
| |
| <script> |
| (function(i, s, o, g, r, a, m) { |
| i["GoogleAnalyticsObject"] = r; |
| (i[r] = |
| i[r] || |
| function() { |
| (i[r].q = i[r].q || []).push(arguments); |
| }), |
| (i[r].l = 1 * new Date()); |
| (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]); |
| a.async = 1; |
| a.src = g; |
| m.parentNode.insertBefore(a, m); |
| })(window, document, "script", "//www.google-analytics.com/analytics.js", "ga"); |
| |
| ga("create", "UA-72162311-1", "auto"); |
| ga("send", "pageview"); |
| </script> |
| |
| |
| </head> |
| |
| <body class="not-front page-documentation" role="document" > |
| <div id="wrapper"> |
| <div class="container"> |
| <div id="banner" class="row v2-main-banner"> |
| <a class="logo-cell" href="/"> |
| <img class="logo" src="../../_static/img/logo.png"> |
| </a> |
| <div class="tagline-cell"> |
| <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> |
| </div> |
| <div class="news-cell"> |
| <div class="well"> |
| <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.11.0, Apache NimBLE 1.6.0 </a> released September 7, 2023) |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <header> |
| <nav id="navbar" class="navbar navbar-inverse" role="navigation"> |
| <div class="container"> |
| <!-- Collapsed navigation --> |
| <div class="navbar-header"> |
| <!-- Expander button --> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| |
| </div> |
| |
| <!-- Expanded navigation --> |
| <div class="navbar-collapse collapse"> |
| <!-- Main navigation --> |
| <ul class="nav navbar-nav navbar-right"> |
| <li> |
| <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> |
| </li> |
| <li class="important"> |
| <a href="/quick-start/">Quick Start</a> |
| </li> |
| <li> |
| <a href="/about/">About</a> |
| </li> |
| <li> |
| <a href="/talks/">Talks</a> |
| </li> |
| <li class="active"> |
| <a href="/documentation/">Documentation</a> |
| </li> |
| <li> |
| <a href="/download/">Download</a> |
| </li> |
| <li> |
| <a href="/community/">Community</a> |
| </li> |
| <li> |
| <a href="/events/">Events</a> |
| </li> |
| </ul> |
| |
| <!-- Search, Navigation and Repo links --> |
| <ul class="nav navbar-nav navbar-right"> |
| |
| </ul> |
| </div> |
| </div> |
| </nav> |
| </header> |
| <!-- STARTS MAIN CONTENT --> |
| <div id="main-content"> |
| |
| |
| |
| |
| |
| |
| <div id="breadcrumb"> |
| <div class="container"> |
| <a href="/documentation/">Docs</a> / |
| |
| <a href="../tutorials.html">Tutorials</a> / |
| |
| <a href="devmgmt.html">Remote Device Management</a> / |
| |
| Over-the-Air Image Upgrade |
| |
| <div class="sourcelink"> |
| <a href="https://github.com/apache/mynewt-documentation/edit/master/docs/tutorials/devmgmt/ota_upgrade_nrf52.rst" class="icon icon-github" |
| rel="nofollow"> Edit on GitHub</a> |
| </div> |
| </div> |
| </div> |
| <!-- STARTS CONTAINER --> |
| <div class="container"> |
| <!-- STARTS .content --> |
| <div id="content" class="row"> |
| |
| <!-- STARTS .container-sidebar --> |
| <div class="container-sidebar col-xs-12 col-sm-3"> |
| <div id="docSidebar" class="sticky-container"> |
| <div role="search" class="sphinx-search"> |
| <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search documentation" class="search-documentation" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| <!-- Note: only works when deployed --> |
| <select class="form-control" onchange="if (this.value) window.location.href=this.value"> |
| <option value="/latest" selected> |
| Version: latest |
| </option> |
| <option value="/v1_11_0" > |
| Version: 1.11.0 |
| </option> |
| <option value="/v1_10_0" selected="selected" > |
| Version: 1.10.0 |
| </option> |
| <option value="/v1_9_0" > |
| Version: 1.9.0 |
| </option> |
| <option value="/v1_8_0" > |
| Version: 1.8.0 |
| </option> |
| <option value="/v1_7_0" > |
| Version: 1.7.0 |
| </option> |
| <option value="/v1_6_0" > |
| Version: 1.6.0 |
| </option> |
| <option value="/v1_5_0" > |
| Version: 1.5.0 |
| </option> |
| <option value="/v1_4_0" > |
| Version: 1.4.0 |
| </option> |
| <option value="/v1_3_0/os/introduction" > |
| Version: 1.3.0 |
| </option> |
| <option value="/v1_2_0/os/introduction" > |
| Version: 1.2.0 |
| </option> |
| <option value="/v1_1_0/os/introduction" > |
| Version: 1.1.0 |
| </option> |
| <option value="/v1_0_0/os/introduction" > |
| Version: 1.0.0 |
| </option> |
| <option value="/v0_9_0/os/introduction" > |
| Version: 0.9.0 |
| </option> |
| </select> |
| <div class="region region-sidebar"> |
| <div class="docs-menu"> |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../index.html">Introduction</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../get_started/index.html">Setup & Get Started</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../concepts.html">Concepts</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="../tutorials.html">Tutorials</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="../blinky/blinky.html">Project Blinky</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../repo/add_repos.html">Working with repositories</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../slinky/project-slinky.html">Project Slinky for Remote Comms</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../ble/ble.html">Bluetooth Low Energy</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../lora/lorawanapp.html">LoRa</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../os_fundamentals/os_fundamentals.html">OS Fundamentals</a></li> |
| <li class="toctree-l2 current"><a class="reference internal" href="devmgmt.html">Remote Device Management</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="add_newtmgr.html">Enable Newt Manager in Any App</a></li> |
| <li class="toctree-l3 current"><a class="current reference internal" href="#">Upgrade an Image Over-The-Air</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="../sensors/sensors.html">Sensors</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../tooling/tooling.html">Tooling</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../other/other.html">Other</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../../external_links.html">Third-party Resources</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../os/os_user_guide.html">OS User Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../network/index.html">BLE User Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../newt/index.html">Newt Tool Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../newtmgr/index.html">Newt Manager Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../mynewt_faq/index.html">Mynewt FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../misc/index.html">Appendix</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </div> |
| <!-- ENDS STICKY CONTAINER --> |
| </div> |
| <!-- ENDS .container-sidebar --> |
| |
| <div class="col-xs-12 col-sm-9"> |
| |
| <div class="alert alert-warning"> |
| <p> |
| Version 1.10.0 is not the most recent version of the |
| Apache Mynewt documentation. Click <a href="/latest">here</a> to |
| read the latest version. |
| </p> |
| </div> |
| |
| |
| |
| <div class=""> |
| <div class="rst-content"> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="over-the-air-image-upgrade"> |
| <h1>Over-the-Air Image Upgrade<a class="headerlink" href="#over-the-air-image-upgrade" title="Permalink to this headline">¶</a></h1> |
| <p>Mynewt OS supports over-the-air image upgrades. This tutorial shows you |
| how to use the newtmgr tool to upgrade an image on a device over BLE |
| communication.</p> |
| <p>To support over-the-air image upgrade over BLE, a device must be running |
| a Mynewt application that has newtmgr image management over BLE |
| transport enabled. For this tutorial, we use the |
| <span class="xref std std-doc">bleprph</span> application, which |
| includes image management over BLE functionality, on an nRF52-DK board. |
| If you prefer to use a different BLE application, see <span class="xref std std-doc">Enable Newt |
| Manager in any app</span> to enable newtmgr |
| image management over BLE transport support in your application.</p> |
| <p><strong>Note:</strong> Over-the-air upgrade via newtmgr BLE transport is supported on |
| Mac OS and Linux. It is not supported on Windows platforms.</p> |
| <div class="contents local topic" id="contents"> |
| <ul class="simple"> |
| <li><p><a class="reference internal" href="#prerequisites" id="id1">Prerequisites</a></p></li> |
| <li><p><a class="reference internal" href="#reducing-the-log-level" id="id2">Reducing the Log Level</a></p></li> |
| <li><p><a class="reference internal" href="#upgrading-an-image-on-a-device" id="id3">Upgrading an Image on a Device</a></p></li> |
| <li><p><a class="reference internal" href="#step-1-creating-a-newtmgr-connection-profile" id="id4">Step 1: Creating a Newtmgr Connection Profile</a></p></li> |
| <li><p><a class="reference internal" href="#step-2-uploading-an-image-to-the-device" id="id5">Step 2: Uploading an Image to the Device</a></p></li> |
| <li><p><a class="reference internal" href="#step-3-testing-the-image" id="id6">Step 3: Testing the Image</a></p></li> |
| <li><p><a class="reference internal" href="#step-4-confirming-the-image" id="id7">Step 4: Confirming the Image</a></p></li> |
| </ul> |
| </div> |
| <div class="section" id="prerequisites"> |
| <h2><a class="toc-backref" href="#id1">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2> |
| <p>Ensure that you meet the following prerequisites:</p> |
| <ul class="simple"> |
| <li><p>Have Internet connectivity to fetch remote Mynewt components.</p></li> |
| <li><p>Have a computer that supports Bluetooth to communicate with the board |
| and to build a Mynewt application.</p></li> |
| <li><p>Have a Micro-USB cable to connect the board and the computer.</p></li> |
| <li><p>Have a Nordic nRF52-DK Development Kit - PCA 10040</p></li> |
| <li><p>Install the <span class="xref std std-doc">Segger JLINK software and documentation |
| pack</span>.</p></li> |
| <li><p>Install the newt tool and toolchains (See <a class="reference internal" href="../../get_started/index.html"><span class="doc">Setup & Get Started</span></a>).</p></li> |
| <li><p>Read the Mynewt OS <a class="reference internal" href="../../concepts.html"><span class="doc">Concepts</span></a> |
| section.</p></li> |
| <li><p>Read the <a class="reference internal" href="../../os/modules/bootloader/bootloader.html"><span class="doc">Secure Bootloader</span></a> section |
| and understand the Mynewt bootloader concepts.</p></li> |
| <li><p>Build and load the <strong>bleprph</strong> application on to an nRF52-DK board |
| via a serial connection. See <a class="reference internal" href="../ble/bleprph/bleprph.html"><span class="doc">BLE Peripheral |
| App</span></a>.</p></li> |
| </ul> |
| </div> |
| <div class="section" id="reducing-the-log-level"> |
| <h2><a class="toc-backref" href="#id2">Reducing the Log Level</a><a class="headerlink" href="#reducing-the-log-level" title="Permalink to this headline">¶</a></h2> |
| <p>You need to build your application with log level set to INFO or lower. |
| The default log level for the <strong>bleprph</strong> app is set to DEBUG. The extra |
| logging causes the communication to timeout. Perform the following to |
| reduce the log level to INFO, build, and load the application.</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newt<span class="w"> </span>target<span class="w"> </span>amend<span class="w"> </span>myperiph<span class="w"> </span><span class="nv">syscfg</span><span class="o">=</span><span class="s2">"LOG_LEVEL=1"</span> |
| <span class="gp">$ </span>newt<span class="w"> </span>build<span class="w"> </span>myperiph |
| <span class="gp">$ </span>newt<span class="w"> </span>create-image<span class="w"> </span>myperiph<span class="w"> </span><span class="m">1</span>.0.0 |
| <span class="gp">$ </span>newt<span class="w"> </span>load<span class="w"> </span>myperiph |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="upgrading-an-image-on-a-device"> |
| <h2><a class="toc-backref" href="#id3">Upgrading an Image on a Device</a><a class="headerlink" href="#upgrading-an-image-on-a-device" title="Permalink to this headline">¶</a></h2> |
| <p>Once you have an application with |
| newtmgr image management with BLE transport support running on a device, |
| you can use the newtmgr tool to upgrade an image over-the-air.</p> |
| <p>You must perform the following steps to upgrade an image:</p> |
| <p>Step 1: Create a newtmgr connection profile to communicate with the |
| device over BLE. Step 2: Upload the image to the secondary slot (slot 1) |
| on the device. Step 3: Test the image. Step 4: Confirm and make the |
| image permanent.</p> |
| <p>See the <a class="reference internal" href="../../os/modules/bootloader/bootloader.html"><span class="doc">Secure Bootloader</span></a> section for |
| more information on the bootloader, image slots, and boot states.</p> |
| </div> |
| <div class="section" id="step-1-creating-a-newtmgr-connection-profile"> |
| <h2><a class="toc-backref" href="#id4">Step 1: Creating a Newtmgr Connection Profile</a><a class="headerlink" href="#step-1-creating-a-newtmgr-connection-profile" title="Permalink to this headline">¶</a></h2> |
| <p>The <strong>bleprph</strong> application sets and advertises <code class="docutils literal notranslate"><span class="pre">nimble-bleprph</span></code> as its bluetooth |
| device address. Run the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">conn</span> <span class="pre">add</span></code> command to create a newtmgr |
| connection profile that uses this peer address to communicate with the |
| device over BLE:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>conn<span class="w"> </span>add<span class="w"> </span>mybleprph<span class="w"> </span><span class="nv">type</span><span class="o">=</span>ble<span class="w"> </span><span class="nv">connstring</span><span class="o">=</span><span class="s2">"peer_name=nimble-bleprph"</span> |
| <span class="go">Connection profile mybleprph successfully added</span> |
| </pre></div> |
| </div> |
| <p>Verify that the newtmgr tool can communicate with the device and check |
| the image status on the device:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>image<span class="w"> </span>list<span class="w"> </span>-c<span class="w"> </span>mybleprph |
| <span class="go">Images:</span> |
| <span class="go"> slot=0</span> |
| <span class="go"> version: 1.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: active confirmed</span> |
| <span class="go"> hash: b8d17c77a03b37603cd9f89fdcfe0ba726f8ddff6eac63011dee2e959cc316c2</span> |
| <span class="go">Split status: N/A (0)</span> |
| </pre></div> |
| </div> |
| <p>The device only has an image loaded on the primary slot (slot 0). It |
| does not have an image loaded on the secondary slot (slot 1).</p> |
| </div> |
| <div class="section" id="step-2-uploading-an-image-to-the-device"> |
| <h2><a class="toc-backref" href="#id5">Step 2: Uploading an Image to the Device</a><a class="headerlink" href="#step-2-uploading-an-image-to-the-device" title="Permalink to this headline">¶</a></h2> |
| <p>We create an image with version 2.0.0 for the bleprph application from the <code class="docutils literal notranslate"><span class="pre">myperiph</span></code> target and |
| upload the new image. You can upload a different image.</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newt<span class="w"> </span>create-image<span class="w"> </span>myperiph<span class="w"> </span><span class="m">2</span>.0.0 |
| <span class="go">App image succesfully generated: ~/dev/myproj/bin/targets/myperiph/app/apps/bleprph/bleprph.img</span> |
| </pre></div> |
| </div> |
| <p>Run the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">image</span> <span class="pre">upload</span></code> command to upload the image:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>image<span class="w"> </span>upload<span class="w"> </span>-c<span class="w"> </span>mybleprph<span class="w"> </span>~/dev/myproj/bin/targets/myperiph/app/apps/bleprph/bleprph.img |
| <span class="go">215</span> |
| <span class="go">429</span> |
| <span class="go">642</span> |
| <span class="go">855</span> |
| <span class="go">1068</span> |
| <span class="go">1281</span> |
| |
| <span class="go">...</span> |
| |
| <span class="go">125953</span> |
| <span class="go">126164</span> |
| <span class="go">126375</span> |
| <span class="go">126586</span> |
| <span class="go">126704</span> |
| <span class="go">Done</span> |
| </pre></div> |
| </div> |
| <p>The numbers indicate the number of bytes that the newtmgr tool has |
| uploaded.</p> |
| <p>Verify that the image uploaded to the secondary slot on the device |
| successfully:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>image<span class="w"> </span>list<span class="w"> </span>-c<span class="w"> </span>mybleprph |
| <span class="go">Images:</span> |
| <span class="go"> slot=0</span> |
| <span class="go"> version: 1.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: active confirmed</span> |
| <span class="go"> hash: b8d17c77a03b37603cd9f89fdcfe0ba726f8ddff6eac63011dee2e959cc316c2</span> |
| <span class="go"> slot=1</span> |
| <span class="go"> version: 2.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags:</span> |
| <span class="go"> hash: 291ebc02a8c345911c96fdf4e7b9015a843697658fd6b5faa0eb257a23e93682</span> |
| <span class="go">Split status: N/A (0)</span> |
| </pre></div> |
| </div> |
| <p>The device now has the uploaded image in the secondary slot (slot 1).</p> |
| </div> |
| <div class="section" id="step-3-testing-the-image"> |
| <h2><a class="toc-backref" href="#id6">Step 3: Testing the Image</a><a class="headerlink" href="#step-3-testing-the-image" title="Permalink to this headline">¶</a></h2> |
| <p>The image is uploaded to the secondary |
| slot but is not yet active. You must run the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">image</span> <span class="pre">test</span></code> |
| command to set the image status to <strong>pending</strong> and reboot the device. |
| When the device reboots, the bootloader copies this image to the primary |
| slot and runs the image.</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>image<span class="w"> </span><span class="nb">test</span><span class="w"> </span>-c<span class="w"> </span>mybleprph<span class="w"> </span>291ebc02a8c345911c96fdf4e7b9015a843697658fd6b5faa0eb257a23e93682 |
| <span class="go">Images:</span> |
| <span class="go"> slot=0</span> |
| <span class="go"> version: 1.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: active confirmed</span> |
| <span class="go"> hash: b8d17c77a03b37603cd9f89fdcfe0ba726f8ddff6eac63011dee2e959cc316c2</span> |
| <span class="go"> slot=1</span> |
| <span class="go"> version: 2.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: pending</span> |
| <span class="go"> hash: 291ebc02a8c345911c96fdf4e7b9015a843697658fd6b5faa0eb257a23e93682</span> |
| <span class="go">Split status: N/A (0)</span> |
| </pre></div> |
| </div> |
| <p>The status of the image in the secondary slot is now set to <strong>pending</strong>.</p> |
| <p>Power the device OFF and ON and run the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">image</span> <span class="pre">list</span></code> command |
| to check the image status on the device after the reboot:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>image<span class="w"> </span>list<span class="w"> </span>-c<span class="w"> </span>mybleprph |
| <span class="go">Images:</span> |
| <span class="go"> slot=0</span> |
| <span class="go"> version: 2.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: active</span> |
| <span class="go"> hash: 291ebc02a8c345911c96fdf4e7b9015a843697658fd6b5faa0eb257a23e93682</span> |
| <span class="go"> slot=1</span> |
| <span class="go"> version: 1.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: confirmed</span> |
| <span class="go"> hash: b8d17c77a03b37603cd9f89fdcfe0ba726f8ddff6eac63011dee2e959cc316c2</span> |
| <span class="go">Split status: N/A (0)</span> |
| </pre></div> |
| </div> |
| <p>The uploaded image is now active and running in the primary slot. The |
| image, however, is not confirmed. The confirmed image is in the |
| secondary slot. On the next reboot, the bootloader reverts to using the |
| confirmed image. It copies the confirmed image to the primary slot and |
| runs the image when the device reboots. You need to confirm and make the |
| uploaded image in the primary slot permanent.</p> |
| </div> |
| <div class="section" id="step-4-confirming-the-image"> |
| <h2><a class="toc-backref" href="#id7">Step 4: Confirming the Image</a><a class="headerlink" href="#step-4-confirming-the-image" title="Permalink to this headline">¶</a></h2> |
| <p>Run the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">image</span> <span class="pre">confirm</span></code> command to confirm and make the |
| uploaded image permanent. Since the uploaded image is currently the |
| active image, you can confirm the image setup without specifying the |
| image hash value in the command:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>newtmgr<span class="w"> </span>image<span class="w"> </span>confirm<span class="w"> </span>-c<span class="w"> </span>mybleprph |
| <span class="go">Images:</span> |
| <span class="go"> slot=0</span> |
| <span class="go"> version: 2.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags: active confirmed</span> |
| <span class="go"> hash: 291ebc02a8c345911c96fdf4e7b9015a843697658fd6b5faa0eb257a23e93682</span> |
| <span class="go"> slot=1</span> |
| <span class="go"> version: 1.0.0</span> |
| <span class="go"> bootable: true</span> |
| <span class="go"> flags:</span> |
| <span class="go"> hash: b8d17c77a03b37603cd9f89fdcfe0ba726f8ddff6eac63011dee2e959cc316c2</span> |
| <span class="go">Split status: N/A (0)</span> |
| </pre></div> |
| </div> |
| <p>The uploaded image is now the active and confirmed image. You have |
| successfully upgraded an image over-the-air.</p> |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| |
| <div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../sensors/sensors.html" class="btn btn-neutral float-right" title="Sensors" accesskey="n">Next: Sensors <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="add_newtmgr.html" class="btn btn-neutral" title="Enabling Newt Manager in Your Application" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: Enabling Newt Manager in Your Application</a> |
| |
| </div> |
| |
| </div> |
| </div> |
| </div> |
| <!-- ENDS CONTENT SECTION --> |
| </div> |
| <!-- ENDS .content --> |
| </div> |
| </div> |
| <footer> |
| <div class="container"> |
| <div class="row"> |
| <div class="col-xs-12"> |
| |
| <p class="copyright">Apache Mynewt is available under Apache License, version 2.0.</p> |
| |
| </div> |
| <div class="col-xs-12"> |
| <div class="logos"> |
| <img src="../../_static/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> |
| <small class="footnote"> |
| Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt project logo are either |
| registered trademarks or trademarks of the Apache Software Foundation in the United States and other countries. |
| </small> |
| <a href=""> |
| <img src="../../_static/img/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" /> |
| </a> |
| </div> |
| </div> |
| </div> |
| </div> |
| </footer> |
| </div> |
| <!-- ENDS #wrapper --> |
| |
| |
| |
| <script type="text/javascript"> |
| var DOCUMENTATION_OPTIONS = { |
| URL_ROOT:'../../', |
| VERSION:'latest', |
| COLLAPSE_INDEX:false, |
| FILE_SUFFIX:'.html', |
| HAS_SOURCE: true, |
| SOURCELINK_SUFFIX: '.txt', |
| LINK_SUFFIX: '.html' |
| }; |
| </script> |
| <script type="text/javascript" src="../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../_static/doctools.js"></script> |
| <script type="text/javascript" src="../../_static/js/bootstrap-3.0.3.min.js"></script> |
| <script type="text/javascript" src="../../_static/js/affix.js"></script> |
| <script type="text/javascript" src="../../_static/js/main.js"></script> |
| |
| |
| |
| </body> |
| </html> |