<?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>Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127253/both-on-android-and-ios-stops-dfu-process-if-device-reports-busy-using-nordic-dfu_mcumgr-lib</link><description>I have been experience that the if the device under a DFU process reports the error BUSY, because the external flash on the device is used for fileaccess the DFU process from the app fails and stops. 
 
 I have to resytart the whole process, it seems</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Mar 2026 11:22:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127253/both-on-android-and-ios-stops-dfu-process-if-device-reports-busy-using-nordic-dfu_mcumgr-lib" /><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/564023?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2026 11:22:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddec5b00-b741-4dbf-8a00-f6fda7b9d87b</guid><dc:creator>Dinesh Harjani</dc:creator><description>&lt;p&gt;Bit of follow-up - there&amp;#39;s a possible fix in the main branch. Let me know when you&amp;#39;ve tested it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/563936?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2026 10:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49114de2-09db-4c3c-99b6-77bf56d1a368</guid><dc:creator>Dinesh Harjani</dc:creator><description>&lt;p&gt;Hi Tommy. Dinesh here, I maintain the iOS DFU Library (McuMgr). &lt;br /&gt;&lt;br /&gt;Are you guys able to pull from main branch and test a possible fix for this? Or do you need a release? This is so I can push a possible fix, so you guys can test whether it works for you or not, and provide some feedback without the need for a release without knowing for sure if it works out.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/563866?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2026 12:47:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f254445-6398-445e-bae7-b4e2961ded28</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, yes, we will handle this status in the library. We will soon switch to nRF Connect Device Manager project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/563737?ContentTypeID=1</link><pubDate>Fri, 20 Mar 2026 07:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d8e7f7f-614a-45da-9658-fb5f1e3fc2d6</guid><dc:creator>Tommy F Kristensen</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Alexander&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you planning to make some error handling inside the library. We have handled in our app firmware on both platforms(IOS/Android) in the callback &lt;em&gt;onUpgradeFailed, where we have added a retry logic. &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;But I think that a busy should not lead to&amp;nbsp;onUpgradeFailed on first error.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;Best Regards&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;Tommy F Kristensen&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/562872?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2026 07:23:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c40b7da-8954-43a2-9c71-af04973c2909</guid><dc:creator>Tommy F Kristensen</dc:creator><description>&lt;p&gt;Hi Alexander&lt;/p&gt;
&lt;p&gt;Thanks for your answer&lt;/p&gt;
&lt;p&gt;we are using the external flash for both DFU and external filesystem and occasinally it can be BUSY, so thats why we need handle it :-)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Tommy F Kristensen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/562815?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2026 12:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2217f32-eada-457e-9e34-7647c6705919</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Thank you for the detailed explanation. We will look into this.&lt;/p&gt;
&lt;p&gt;We are not that busy, so we actually never got that error from the device ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/562704?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2026 09:20:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:560cc44c-e000-4307-8190-629f0dfcb2fc</guid><dc:creator>Tommy F Kristensen</dc:creator><description>&lt;p&gt;Hi Vidar&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your answer&lt;/p&gt;
&lt;p&gt;I have been strugling a lot this to understand what did happend.&lt;/p&gt;
&lt;p&gt;By default the&amp;nbsp;FirmwareUpgradeController, does not handle errorcodes like 0x10 (BUSY) from target, it calls&amp;nbsp;onUpgradeFailed. We did implement a retry if the device did report BUSY. This works ok the first 10 times, then the error 257 comes(This error is not coming from the target, but from the Android system(insufficient resources)).&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;em&gt;override fun onUpgradeFailed(state: FirmwareUpgradeManager.State?, error: McuMgrException?) {&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.error(TAG, &amp;quot;(BT) DFU failed: $state, error: $error&amp;quot;)&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; firmwareUpgradeController = null&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (error != null &amp;amp;&amp;amp; &lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error.code.value() == 10 &amp;amp;&amp;amp;&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;(state == FirmwareUpgradeManager.State.VALIDATE || state == FirmwareUpgradeManager.State.UPLOAD) &amp;amp;&amp;amp;&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;retryAttempt &amp;lt; MAX_BUSY_RETRIES&lt;br /&gt; &amp;nbsp;) {&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;scheduleBusyRetry()&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;return&lt;br /&gt; &amp;nbsp;}&lt;/em&gt;&lt;/code&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; In scheduleBusyRetry() we basically reastarted a new dfu, and it resumes the DFU process perfectly 10 times, &lt;br /&gt; but the issue was that the transport was not reused doing a restart of the the DFU process and a new instance was created each time.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;transport = McuMgrBleTransport(context, bluetoothDevice.bluetoothDevice)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;val dfuManager = FirmwareUpgradeManager(transport, dfuCallback)&lt;/code&gt;&lt;br /&gt; ...&lt;br /&gt; It started working after we did start to reuse the transport, &lt;br /&gt; but it was quite hard to figure out cause the only error code we got was error 257, &lt;br /&gt; Fix:&lt;br /&gt; Done Once on dfustart&lt;br /&gt; &lt;code&gt;&lt;em&gt;&amp;nbsp;lastDevice = bluetoothDevice.bluetoothDevice&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;em&gt;&amp;nbsp;lasttransport = McuMgrBleTransport(context, lastDevice!!)&lt;/em&gt;&lt;/code&gt;&lt;br /&gt; &amp;nbsp;...&lt;br /&gt; Done on each retry&lt;br /&gt; &lt;em&gt;&lt;code&gt;val dfuManager = FirmwareUpgradeManager(lasttransport , dfuCallback)&lt;/code&gt;&lt;br /&gt; ....&lt;br /&gt; &lt;/em&gt;It would be nice if the library had implemented some error handling retry on Busy and Timeout from the taget, &lt;br /&gt; not ending in a callback upgradefailed. &lt;br /&gt; This error is seen on both Android and IOS&lt;br /&gt; &lt;br /&gt; Best Regards&lt;br /&gt; Tommy F Kristensen&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Both on android and IOS stops DFU process if device reports busy using Nordic DFU_MCUMGR lib</title><link>https://devzone.nordicsemi.com/thread/562559?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2026 14:25:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88041d00-b948-4e14-b971-88251d03a717</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Tommy,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have reached out to our app developers to see if they have any suggestions to this. Will let you know as soon as I have heard back from them.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>