<!-- HTML header for doxygen 1.8.3.1--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.3.1"/> <title>Nordic Thingy:52 : OTA-DFU with nRF Connect</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/> <link href="nordic.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0" width="100%" class="blank"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">Nordic Thingy:52 </div> </td> </tr> </tbody> </table> <script> var url=window.location.href.split("/").reverse()[1]; var validLinks= ["nrf5","s130","s132","s212","s332"]; var index; for (index = 0; index < validLinks.length; ++index) { if ( url.indexOf(validLinks[index]) !== -1 ) { document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected'); }; }; </script> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.3.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li class="current"><a href="index.html"><span>Introduction</span></a></li> <li><a href="usergroup0.html"><span>API Reference</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('dfu_connect.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="headertitle"> <div class="title">OTA-DFU with nRF Connect </div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><p>You can run a Device Firmware Update on the Thingy using Nordic Semiconductor's nRF Connect mobile and desktop applications.</p> <h1><a class="anchor" id="dfu_performing_desktop"></a> Upgrading with nRF Connect for desktop</h1> <p>The following procedure involves using a desktop device and a connectivity board to run a DFU.</p> <p>Install the following software on your desktop computer before running this procedure:</p> <ul> <li><a href="https://www.nordicsemi.com/chi/node_176/2.4GHz-RF/nRFgo-Studio" target="blank">nRFgo Studio</a></li> <li><a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Connect-for-desktop" target="blank">nRF Connect for desktop</a></li> <li><a href="https://github.com/NordicSemiconductor/pc-nrfutil" target="blank">nrfutil</a></li> </ul> <p>You will also need either an nRF51 or an nRF52 Development Kit that will function as a connectivity board during DFU. It is recommended to erase this board prior to using it for DFU. To do this, open nRFgo Studio, select the board from the list and click <b>Erase all</b>. </p> <div class="image"> <img src="erase_all.png" alt="erase_all.png"/> <div class="caption"> Erasing the connectivity board</div></div> <ol type="1"> <li>Connect a development kit to your computer through the USB port. This DK will serve as an intermediate connectivity board.</li> <li>Run nRF Connect. From the list of ports, choose the serial port where the connectivity board is connected. <div class="image"> <img src="nrf_connect_d_1.png" alt="nrf_connect_d_1.png"/> <div class="caption"> Select the board in nRF Connect</div></div> </li> <li>If the board was erased before, a message will appear that no connectivity firmware was detected. Agree to automatically update the connectivity firmware. <div class="image"> <img src="firmware_update.png" alt="firmware_update.png"/> <div class="caption"> Firmware update prompt</div></div> </li> <li>Click <b>Start Scan</b>. From the available discovered devices, connect to <code>Thingy</code>. Make sure it is not bonded to another host. <dl class="section note"><dt>Note</dt><dd>The list of discovered devices is not automatically refreshed when they stop advertising. Whenever you have problems connecting to a device from the list, try clearing it and rerunning the scan. If the Thingy stops advertising, tap or move it.</dd></dl> </li> <li>Connect to the Thingy. When connecting, you do not need to select any of the optional settings.</li> <li>Expand the FE59 service section and enable notifications by clicking <b>Toggle notifications</b>. Then, type <code>01</code> into the FE59 field. Press Enter or click <b>Write</b>. <div class="image"> <img src="fe59.png" alt="fe59.png"/> <div class="caption"> FE59 service section</div></div> The Thingy now enters DFU mode. You are disconnected from the device and, if you run a new scan, a <code>ThingyDfu</code> device appears in the list of discovered devices. The LED on the Thingy fades in and out rapidly in yellow color. <dl class="section note"><dt>Note</dt><dd>The <code>ThingyDfu</code> device is the Thingy in DFU mode. Notice that its address is always the address of the Thingy plus 1.</dd></dl> </li> <li>Close nRF Connect. Make sure that nRF Connect and nrfutil applications do not run at the same time.</li> <li>With nrfutil installed, open the command prompt and run the following command: <div class="fragment"><div class="line">nrfutil dfu ble -ic <ic_series> -pkg <package_name.zip></div> </div><!-- fragment --> , where <ic_name> is the Series of the connectivity board (<code>NRF51</code> or <code>NRF52</code>) and <package_name.zip> is the path to the ZIP file that is to be transferred to the Thingy. For example: <div class="fragment"><div class="line">nrfutil dfu ble -ic NRF51 -pkg <span class="stringliteral">"thingy_firmware.zip"</span></div> </div><!-- fragment --></li> <li>You might be prompted to select the connectivity serial port. Select the port that the connectivity board is connected to and press Enter. A progress bar will appear showing the progress of the package transfer.</li> </ol> <h1><a class="anchor" id="dfu_performing_mobile"></a> Upgrading with nRF Connect for mobile</h1> <p>The following procedure involves using a mobile device with nRF Connect installed to run a DFU.</p> <p>Before running this procedure, install <a href="https://www.nordicsemi.com/eng/Products/Nordic-mobile-Apps/nRF-Connect-for-mobile-previously-called-nRF-Master-Control-Panel" target="blank">nRF Connect for Mobile</a>.</p> <ol type="1"> <li>Transfer the ZIP packages that will be used for DFU to your mobile device.</li> <li>Power on the Thingy.</li> <li>Open nRF Connect on your mobile device.</li> <li>Tap <b>Scan</b>. From the available discovered devices, connect to the Thingy. <dl class="section note"><dt>Note</dt><dd>The list of discovered devices is not automatically refreshed when they stop advertising. Whenever you have problems connecting to a device from the list, try refreshing the list. If the Thingy stops advertising, tap or move the device.</dd></dl> </li> <li>Expand the Secure DFU Service section. There are two icons to the right of the DFU Control Point area.<ol type="a"> <li>The icon to the right toggles notifications. Make sure they are enabled (the icon must be crossed).</li> <li>Tap the icon to the left to put the Thingy into bootloader (DFU) mode. Tap <b>Send</b> when prompted to reset the device to bootloader. <div class="image"> <img src="dfu_mode.png" alt="dfu_mode.png"/> <div class="caption"> Putting the Thingy into DFU mode (1)</div></div> <div class="image"> <img src="bootloader_reset.png" alt="bootloader_reset.png"/> <div class="caption"> Putting the Thingy into DFU mode (2)</div></div> <dl class="section note"><dt>Note</dt><dd>The Thingy now enters DFU mode. You are disconnected from the device. The LED on the Thingy fades in and out rapidly in yellow color.</dd></dl> </li> </ol> </li> <li>Go to the Scanner tab and run a new scan. A <code>ThingyDfu</code> device appears in the list of discovered devices. <dl class="section note"><dt>Note</dt><dd>The <code>ThingyDfu</code> device is the Thingy in DFU mode. Notice that its address is always the address of the Thingy device plus 1.</dd></dl> </li> <li>Connect to the <code>ThingyDfu</code> device. Tap the DFU icon. <div class="image"> <img src="dfutarg_connect.png" alt="dfutarg_connect.png"/> <div class="caption"> Running DFU on the ThingyDfu device</div></div> </li> <li>Select <b>Distribution packet (ZIP)</b> and navigate to the ZIP package that you previously uploaded to your mobile device. <div class="image"> <img src="distribution_packet.png" alt="distribution_packet.png"/> <div class="caption"> Uploading the ZIP file</div></div> </li> <li>The package is now uploaded to the Thingy in the DFU process. <div class="image"> <img src="dfu_running.png" alt="dfu_running.png"/> <div class="caption"> DFU in progress</div></div> </li> </ol> </div></div><!-- contents --> </div><!-- doc-content --> <div id="nav-path" class="topicfooter"> <a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/> <script> var date = new Date("Tue May 30 2017" + " UTC"); document.getElementById("date").innerHTML = date.toJSON().slice(0, 10); var url=window.location.href.split("?")[0]; var filename=url.substring(url.lastIndexOf('/')+1); document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename); </script> </div> </body> </html>