<?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>Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68345/ability-to-restart-dfu-when-interrupted-while-in-dfutarg</link><description>Sometimes during a DFU update, the NRF52811 can stay in bootloader mode (seen with name DFUTarg and mac_address equal to mac_address +1). I am on Softdevice 16.0 I&amp;#39;m using the https://github.com/NordicSemiconductor/Android-DFU-Library . To be able to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Nov 2020 13:28:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68345/ability-to-restart-dfu-when-interrupted-while-in-dfutarg" /><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280371?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 13:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e4af4f4-8d36-45ca-abb6-1e71253acb14</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;Thank you for your kind help and guidance.&lt;br /&gt;&lt;br /&gt;DFU process was able to proceed again successfuly, after having being able to connect to the PCB in bootloader &amp;quot;DfuTarg&amp;quot; mode. My code that scanned before connecting was still filtering by a custom service that was not available in bootloader mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280253?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 08:14:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:612d1a37-65b1-4955-b7a5-af5e1e668e26</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="QuentinFarizon"]What do you mean by &amp;quot;not a problem&amp;quot; ? How does it work in practice ?[/quote]
&lt;p&gt;I mean you can connect again and try to update. There should not be any problems with that. Is there?&amp;nbsp;&lt;/p&gt;
[quote user="QuentinFarizon"]Is it supposed to also try to mac_address + 1&amp;nbsp; ?[/quote]
&lt;p&gt;Yes, that is intentional. If you use the same old address and is bonded, the phone will attempt to encrypt the link. If you do not share bonding information between the app and bootloader, encryption will fail and the phone will disconnect. Therefor, the bootloader always increments the MAC address by 1 when you use a bootloader without bonding. (You should not take this as an incentive to use bonding with the bootloader unless you have a good reason to do so, as that introduces other problems, particularly if the bond is deleted on the phone after entering DFU mode on the device.).&lt;/p&gt;
[quote user="QuentinFarizon"]Or am I supposed to laucnh DFU on mac_address +1 when it fails on mac_address ?[/quote]
&lt;p&gt;Yes.&amp;nbsp;If not using bonding in the bootloader, you would have the &amp;quot;normal&amp;quot; address when in the application, so this is where you write to the DFU service to make the device start the&amp;nbsp;bootloader and enter DFU mode. After that, you always need to use address + 1 in this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280173?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 15:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fa1b197-b804-4720-bb4c-b38910d9f671</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;What do you mean by &amp;quot;not a problem&amp;quot; ? How does it work in practice ?&lt;br /&gt;When I&amp;#39;m starting a DFU again, it simpy tries to connect to the adress mac, and fails because in DFU targ it has mac_address +1&amp;nbsp;&lt;br /&gt;Is it supposed to also try to mac_address + 1&amp;nbsp; ? Or am I supposed to laucnh DFU on mac_address +1 when it fails on mac_address ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280129?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 14:02:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4549c085-88f1-4de4-be00-d66546e74527</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="QuentinFarizon"]Even withtout a valid app to boot, the bootloader should be OK.[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote user="QuentinFarizon"] Is it not possible to perform a new DFU process, with the bootloader already in DFU mode ?[/quote]
&lt;p&gt;That should not be any problem. (Though it seems like it is in your test, which is why I suggested to get logs to understand what is going on.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280121?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:53:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:166e7b37-11c4-4af6-9115-ea49df03b4ba</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;Even withtout a valid app to boot, the bootloader should be OK. Is it not possible to perform a new DFU process, with the bootloader already in DFU mode ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280118?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b963cda-144f-41a7-b5c4-1ba5f4350612</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="QuentinFarizon"]I&amp;#39;m using an ionic library that uses&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/Android-DFU-Library"&gt;https://github.com/NordicSemiconductor/Android-DFU-Library&lt;/a&gt;&amp;nbsp;under the hood.[/quote]
&lt;p&gt;I see. Then I suggest you test with nRF Connect just to obtain the the log if needed.&lt;/p&gt;
[quote user="QuentinFarizon"]I&amp;#39;m not exactly encountering an issue with real uses, but I try to see if the DFU process is resistant to connection loss, loss of power, ... before allowing users to perform DFu themselves on the field.[/quote]
&lt;p&gt;Then it would also be useful to test with the debug bootloader with RTT logging to understand what happens on the bootloader whenever you see an issue of some sort.&lt;/p&gt;
[quote user="QuentinFarizon"]I will try with&amp;nbsp;&lt;span&gt;NRF_BL_DFU_INACTIVITY_TIMEOUT_MS,&amp;nbsp;if there is a loss of power during upload, it should restart with the previous application right ?&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;Yes. But that of course depends on the presence of a valid application. If the existing application has been removed allready because of a started single bank update of the app or SoftDevice/BL update, then there will not be any valid app to boot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280117?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89fcbb88-32c1-47d0-aa1e-5beca5d3cec0</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;&lt;span&gt;But I&amp;#39;ll still have the issue of my previously distributed PCBs. In the state they are when interrupted, they are on bootloader on DFUTarg, but previous application should still be there. How can I just restart it on the previous application ?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280110?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:37:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1b10e26-5d7b-4c33-b8ae-ed6085159829</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;I&amp;#39;m using an ionic library that uses&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/Android-DFU-Library"&gt;https://github.com/NordicSemiconductor/Android-DFU-Library&lt;/a&gt;&amp;nbsp;under the hood.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not exactly encountering an issue with real uses, but I try to see if the DFU process is resistant to connection loss, loss of power, ... before allowing users to perform DFu themselves on the field.&lt;br /&gt;&lt;br /&gt;I will try with&amp;nbsp;&lt;span&gt;NRF_BL_DFU_INACTIVITY_TIMEOUT_MS,&amp;nbsp;if there is a loss of power during upload, it should restart with the previous application right ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280103?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:463a39da-3a33-4b4c-8679-e914a7794be3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="QuentinFarizon"]When you say &amp;quot;the only way to recover is to perform a successful DFU update.&amp;quot; =&amp;gt; how can we perform a successfulDFU update when in this state ?[/quote]
&lt;p&gt;That depends on which state the device is in, which is not entirely clear to me. What DFU master are you using? If you are testing for nRF Connect, then you can get a log which may give some relevant information. Any other information about when/how update fails will also be useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280100?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59dfed56-0acf-45b4-9682-1b31cff303c0</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;Indeed, I do not have&amp;nbsp;&lt;span&gt;NRF_BL_DFU_INACTIVITY_TIMEOUT_MS set.&lt;br /&gt;&lt;br /&gt;When you say &amp;quot;the only way to recover is to perform a successful DFU update.&amp;quot; =&amp;gt; how can we perform a successfulDFU update when in this state ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/280091?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 12:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77ff9cff-722f-417a-9685-b19302f65d41</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is not DFU command to exit DFU and reset the application. However, the bootloader has a timeout which is configured by&amp;nbsp;NRF_BL_DFU_INACTIVITY_TIMEOUT_MS in the bootloader&amp;#39;s sdk_config.h. This is set to 2 minutes (120000 ms) in most bootloader examples in SDK 16. So if there are more than 2 minutes of inactivity the bootloader will start the app &lt;em&gt;if&lt;/em&gt; a valid app is present. If no valid app is present (typically if having started a single bank update), the only way to recover is to perform a successful DFU update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ability to restart DFU when interrupted while in DFUTarg</title><link>https://devzone.nordicsemi.com/thread/279971?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2020 17:14:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c282f445-c03d-451d-8949-e402239c2a4a</guid><dc:creator>QuentinFarizon</dc:creator><description>&lt;p&gt;I&amp;#39;m using the &amp;quot;Secure DFU service&amp;quot;&lt;br /&gt;&lt;br /&gt;Is there a command that I can write to the &amp;quot;DFU control point&amp;quot; characteristic that would make the card restart to application ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>