<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73090/secure-dfu-update-from-a-remote-server</link><description>Hi, 
 I develop a device with a GPRS modem. GPRS modem is controlled by nrf52840 and it is impossible to use two devices for DFU process. 
 SDK: 17.0.2 
 SoftDevice: s140 7.2.0 
 My idea is: 
 
 Download bin and data files to nrf flash using uart (AT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Mar 2021 08:08:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73090/secure-dfu-update-from-a-remote-server" /><item><title>RE: Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/thread/302059?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 08:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baf856f3-8459-4b6b-8186-ed465e2157f4</guid><dc:creator>lybrus</dc:creator><description>&lt;p&gt;Everything is ok.&amp;nbsp;&lt;code&gt;&lt;strong&gt;nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_RESET);&lt;/strong&gt;&lt;/code&gt; works. I needed to wait untill &lt;code&gt;&lt;strong&gt;nrf_dfu_settings_write_and_backup&lt;/strong&gt;&lt;/code&gt; finish.&lt;/p&gt;
&lt;div style="left:-23px;position:absolute;top:46px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/thread/302022?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 23:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e20c17a-2b17-49c1-b865-e3a49a3c0745</guid><dc:creator>lybrus</dc:creator><description>&lt;p&gt;I&amp;#39;ve done, dfu works =) But I have a stupid problem with i.3 (reboot the MCU). How to do it correct?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// 1
nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_RESET);

// 2
NVIC_SystemReset();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But it doesn&amp;#39;t work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I reboot manually - the bootloader updates firmware.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;nrfjprog -r&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/thread/301832?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 09:38:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d544be7-ab7d-40f2-95e9-62ea7f06f5cf</guid><dc:creator>lybrus</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;As I understood in the application I can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Store init packet using &lt;code&gt;&lt;strong&gt;nrf_dfu_validation_init_cmd_create, nrf_dfu_validation_init_cmd_append&lt;/strong&gt;&lt;/code&gt; and&lt;strong&gt;&lt;/strong&gt;&lt;code&gt;&lt;strong&gt; nrf_dfu_validation_init_cmd_execute&lt;/strong&gt;&lt;/code&gt;. The last one returns the address to store the new firmware packet.&lt;/li&gt;
&lt;li&gt;Store new firmware packet using &lt;code&gt;&lt;strong&gt;nrf_dfu_flash_store&lt;/strong&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;And just reboot the MCU. Bootloader compiled with &lt;code&gt;&lt;strong&gt;NRF_BL_DFU_ALLOW_UPDATE_FROM_APP=1&lt;/strong&gt;&lt;/code&gt;, right?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/thread/301827?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 09:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a7888f-0886-40ad-8a99-7bb085cbc070</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Damir,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the delay.&lt;/p&gt;
[quote user="lybrus"]How to get the&amp;nbsp;right address to store firmware? Or I need to write the new firmware to free space and tell the address of the new firmware to the bootloader?[/quote]
&lt;p&gt;See&amp;nbsp;&lt;a title="Device Firmware Update process" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_dfu_process.html?cp=7_1_3_5_1"&gt;Device Firmware Update process&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_dfu_banks.html"&gt;Dual-bank and single-bank updates&lt;/a&gt;&amp;nbsp;doc.&amp;nbsp;&lt;/p&gt;
[quote user="lybrus"]How to tell the bootloader to validate the new firmware?[/quote]
&lt;p&gt;Sorry for the delay. Please see the&amp;nbsp;&lt;a title="Validation" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_dfu_validation.html?cp=7_1_3_5_1_1"&gt;Validation&lt;/a&gt;&amp;nbsp;doc. &amp;nbsp;&lt;/p&gt;
[quote user="lybrus"]Is it suitable for the softdevice and bootloader update?[/quote]
&lt;p&gt;&amp;nbsp;Yes, see&amp;nbsp;&lt;a title="Bootloader and DFU modules" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_modules.html?cp=7_1_3_5"&gt;Bootloader and DFU modules&lt;/a&gt;&amp;nbsp;doc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/thread/301266?ContentTypeID=1</link><pubDate>Mon, 22 Mar 2021 15:33:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc65718b-f006-4abe-85c3-f59768994726</guid><dc:creator>lybrus</dc:creator><description>&lt;p&gt;As I understood, I need to store firmware in my application using &lt;code&gt;&lt;strong&gt;nrf_fstorage&lt;/strong&gt;&lt;/code&gt;,(like in nrf_dfu_flash.c) build the bootloader with &lt;strong&gt;&lt;code&gt;NRF_BL_DFU_ALLOW_UPDATE_FROM_APP=1&lt;/code&gt;&lt;/strong&gt; and tell the bootloader to validate the new firmware.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How to get the&amp;nbsp;right address to store firmware? Or I need to write the new firmware to free space and tell the address of the new firmware to the bootloader?&lt;/li&gt;
&lt;li&gt;How to tell the bootloader to validate the new firmware?&lt;/li&gt;
&lt;li&gt;Is it suitable for the softdevice and bootloader update?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU, update from a remote server</title><link>https://devzone.nordicsemi.com/thread/301209?ContentTypeID=1</link><pubDate>Mon, 22 Mar 2021 13:09:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef32dc89-659e-478c-95fe-a41c2f01d16a</guid><dc:creator>lybrus</dc:creator><description>&lt;p&gt;As a start point for the bootloader I&amp;#39;m planning to use&amp;nbsp;/nRF5_SDK_17.0.2_d674dde/examples/dfu/secure_bootloader/pca10056_s140_ble to keep&amp;nbsp;DFU using BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>