<?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>Bootloader and nRF Connect can&amp;#39;t resume DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34315/bootloader-and-nrf-connect-can-t-resume-dfu</link><description>Hello, 
 I&amp;#39;m testing the bootloader with SDK v.15 and I found a state when DFU won&amp;#39;t resume (on BLE transport). 
 I crashed nRF Connect randomly, in that case, between the first and second object. Here is the log: 
 &amp;lt;debug&amp;gt; app: Shutting down transports</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 May 2018 15:06:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34315/bootloader-and-nrf-connect-can-t-resume-dfu" /><item><title>RE: Bootloader and nRF Connect can't resume DFU</title><link>https://devzone.nordicsemi.com/thread/134077?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 15:06:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66442b0d-aea5-40c5-b1f8-782b94459da4</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks to your report and detailed descriptions our software engineers have identified an issue: If the DFU is aborted at one particular moment, in-between two objects, it may enter the state that you are experiencing.&lt;/p&gt;
&lt;p&gt;It only happens on disconnect + reconnect, as that does not trigger a reset of the DFU target.&lt;/p&gt;
&lt;p&gt;The problem is that the connection is lost immediately after a create_object, and when the connection is reestablished the DFU controller performs an execute before resuming the update. They propose fixing it by resetting the settings on disconnect, either through (a potentially modified) nrf_dfu_settings_init(), or as you suggested by doing a reset.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and nRF Connect can't resume DFU</title><link>https://devzone.nordicsemi.com/thread/133941?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 07:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34d2dfb4-06c5-49fa-ac7d-3b220a3b984d</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;Another weird thing&amp;nbsp;is that the BLE disconnection is not always notified to nrf_dfu_ble.c (event&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_DISCONNECTED).&lt;br /&gt;When not notified, we have to wait for the bootloader watchdog to reset the bootloader which is, to my mind, too long to resume DFU.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and nRF Connect can't resume DFU</title><link>https://devzone.nordicsemi.com/thread/133833?ContentTypeID=1</link><pubDate>Tue, 29 May 2018 13:19:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ba5cde7-3e40-40e1-980b-238eb40e8a74</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Also sorry for the delay, I&amp;#39;m not totally focused on the bootloader right now...&lt;/p&gt;
&lt;p&gt;Correct, if I provide a different DFU package it works (bootloader settings are not re-used).&lt;br /&gt;&lt;br /&gt;I tried to replicate the bug using the examples you provide along with nRF Connect for Android (OnePlus 3T and OnePlus 6). I&amp;nbsp;flashed my PCA10056&amp;nbsp;with the secure BLE bootloader and tried to upload the&amp;nbsp;example image (hrs_application_s140.zip). I killed nRF Connect while uploading the image and after a few tests, I had the same bug.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;More information&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- It seems to appear when the bootloader doesn&amp;#39;t reset at all after being disconnected: advertising resumes as expected, then I re-connect and try to send the same image, and got OPERATION_NOT_PERMITTED.&lt;br /&gt;Then even if it resets several times, I&amp;#39;m not able to send the same image and got OPERATION_NOT_PERMITTED each time I try to send the image.&lt;br /&gt;- But, if after being disconnected during upload, it resumes advertising but then reset (before reconnected and trying to send the image), the bug is not present anymore. Probably a variable not being reset correctly when disconnected.&lt;/p&gt;
&lt;p&gt;One workaround in the short-term would be to reset the bootloader when disconnected.&lt;br /&gt;&lt;br /&gt;Best&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and nRF Connect can't resume DFU</title><link>https://devzone.nordicsemi.com/thread/132743?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 12:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a674bc8-9dfa-4e2b-9e28-147b9735512c</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First, I am sorry for the late response on this one.&lt;/p&gt;
&lt;p&gt;Reading between the lines it looks like you get it to work if you provide a different DFU package from the one you used when it fails. Can you confirm that?&lt;/p&gt;
&lt;p&gt;Can you provide a hex dump from when this has happened? (&amp;quot;&lt;code&gt;nrfjprog --readcode filename.hex&lt;/code&gt;&amp;quot; for dumping the flash contents to a file named &amp;quot;filename.hex&amp;quot;.) If you do not want to share this publicly then please create a private ticket and refer to this thread.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and nRF Connect can't resume DFU</title><link>https://devzone.nordicsemi.com/thread/131837?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 10:07:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1e1d90c-e56b-438b-9bb7-6cfa2473d93f</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;This bug can be reproduced quite easily, I killed nRF Connect for Android while performing the upgrade and after several times, I got the same bug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>