<?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>Making a DFU controller: how to properly handle [DFU] Invalid system components (send 04, recv 60-04-0A)?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51866/making-a-dfu-controller-how-to-properly-handle-dfu-invalid-system-components-send-04-recv-60-04-0a</link><description>Hi, 
 I&amp;#39;m developing a BLE DFU controller with bluepy on a RPi3. The peripheral that is being updated is a nRF51 device on SDK 12.3.0, with the secure bootloader and experimental buttonless DFU service. 
 The script seems to DFU perfectly fine, and now</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Sep 2019 12:15:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51866/making-a-dfu-controller-how-to-properly-handle-dfu-invalid-system-components-send-04-recv-60-04-0a" /><item><title>RE: Making a DFU controller: how to properly handle [DFU] Invalid system components (send 04, recv 60-04-0A)?</title><link>https://devzone.nordicsemi.com/thread/208931?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2019 12:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9fe225a-e661-4b54-b294-5b9d0a02a623</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi SCLA,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried to reproduce the situation that you described. But as far as I remember, the SD+BL+APP is done as it&amp;#39;s 2 separated DFU update, first with SD+BL and then a normal APP update. So what you described of the behaviour of the nRFConnect app seems to match with my understanding.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Making a DFU controller: how to properly handle [DFU] Invalid system components (send 04, recv 60-04-0A)?</title><link>https://devzone.nordicsemi.com/thread/208757?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 17:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf8c5799-0443-455f-a97d-f89c08264d13</guid><dc:creator>scla</dc:creator><description>&lt;p&gt;Thanks for the replies.&lt;/p&gt;
&lt;p&gt;In this case, I&amp;#39;m not sure how knowing the exact problem will help. My DFU controller is able to successfully transfer DFU packages to DFU Targets. But I am attempting to make my custom DFU controller robust to handle issues that may arise. As far as I am aware, the DFU controller would only ever receive these response codes, &amp;quot;operation not permitted,&amp;quot; and so would need to know how to resolve the issue with only&amp;nbsp;having this information.&lt;/p&gt;
&lt;p&gt;So I see the nRFConnect utility will resolve this issue just from the response code. For eg., when I put the DFU Target into this bad state (by forcibly disconnecting my controller from the DFU target after the SDBL is sent and before any bytes from the application are sent), I will then attempt to DFU with nRFConnect over my Android phone. nRFConnect sends 0x04 and receives 60-40-0a. I see a &amp;#39;[DFU] Invalid System Components&amp;#39; log, then it proceeds to resolve the issue and uploads the application. Am I wrong in&amp;nbsp;believing there is a straight-forward&amp;nbsp;protocol for handling ALL &amp;quot;x040a&amp;quot; and &amp;quot;operation not permitted&amp;quot; response codes? If I am, how does the nRFConnect app know how to handle this response?&lt;/p&gt;
&lt;p&gt;I can still look into this though.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Edit -&lt;/p&gt;
&lt;p&gt;Following the nRFConnect logs when the controller resolves the issue, it looks like it &amp;#39;forces&amp;#39;&amp;nbsp;upload of the app init packet. It will send a select command, receive the offset and crc of the EOF of the SDBL init packet, ignore these values, and start&amp;nbsp;sending the app init packet bytes to the DFU packet char.&lt;/p&gt;
&lt;p&gt;Trying this in my custom DFU controller, it seems to &amp;#39;work&amp;#39; in that the application successfully transfers and runs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Making a DFU controller: how to properly handle [DFU] Invalid system components (send 04, recv 60-04-0A)?</title><link>https://devzone.nordicsemi.com/thread/208730?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 14:21:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3041358f-5bb7-4bb8-9014-10b97dc21660</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Scla, &lt;br /&gt;If you have a look here &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/lib_dfu_transport_ble.html?cp=5_5_7_3_5_2_2"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/lib_dfu_transport_ble.html?cp=5_5_7_3_5_2_2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can find that 0x08 response code is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="1" rowspan="1"&gt;Operation not permitted&lt;/td&gt;
&lt;td colspan="1" rowspan="1"&gt;The state of the DFU process did not allow this operation.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you have a look at&amp;nbsp;NRF_DFU_OBJECT_OP_CREATE case in&amp;nbsp;nrf_dfu_data_req() inside dfu_req_handling.c you can see several situations that it would return&amp;nbsp;NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED.&lt;/p&gt;
&lt;p&gt;I agree with Jorg, you should build&amp;nbsp; the&amp;nbsp;&amp;nbsp;bootloader with debug logging enabled, much more information for testing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Making a DFU controller: how to properly handle [DFU] Invalid system components (send 04, recv 60-04-0A)?</title><link>https://devzone.nordicsemi.com/thread/208549?ContentTypeID=1</link><pubDate>Sat, 07 Sep 2019 12:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c4391bc-0fb3-4ef6-8895-7bb48135f2a7</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;I recommend looking at the source code in the SDK directly.&lt;/p&gt;
&lt;p&gt;You can build a debug version of the bootloader with debug symbols and RTT logging. Only disadvantage: It will be MUCH bigger than the non-debug one (adjusting bootloader addr in UICR required).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>