<?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>Potential DFU process bug</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71370/potential-dfu-process-bug</link><description>I&amp;#39;m currently implementing a DFU &amp;quot;controller&amp;quot; in C on the nRF9160 for performing serial DFU with the nRF52840 and believe I have discovered a bug. 
 My firmware image was transferred for all but the final block, which was of size less than a code page</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Feb 2021 13:19:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71370/potential-dfu-process-bug" /><item><title>RE: Potential DFU process bug</title><link>https://devzone.nordicsemi.com/thread/294636?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 13:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a00a680-cc6d-4cab-9d68-11d0e1d132a8</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find the documentation for the different DFU requests here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_dfu_transport.html#lib_dfu_transport_op_descriptions"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_dfu_transport.html#lib_dfu_transport_op_descriptions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If we take a look at&amp;nbsp;Create request, then it&amp;#39;s stated that it will &amp;quot;Reset the progress since the last Execute command&amp;quot;. So if you detect a CRC-error(e.g. with CRC request), and you have not Executed the object, the host could just retry by sending a&amp;nbsp;new&amp;nbsp;&lt;span&gt;Create request. The documentation is not very clear on this point, but if you have Executed the object, and you detect a CRC error after that, it looks like it possible to use the&amp;nbsp;Select request, to&amp;nbsp;trigger the last transferred object of the specified object type to be selected, thus to be made the currently active object. And then you could try to send that&amp;nbsp;object again.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Potential DFU process bug</title><link>https://devzone.nordicsemi.com/thread/293936?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 10:44:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:817c55e1-1c93-43d4-8a9b-059fa71d987e</guid><dc:creator>jongor</dc:creator><description>&lt;p&gt;I don&amp;#39;t feel you&amp;#39;ve read my question properly. HOST doesn&amp;#39;t tell TARGET what offset into the image it is sending. It is always assumed it moves forwards. So when the HOST repeats a block, there is no way for the TARGET to know it is doing that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Potential DFU process bug</title><link>https://devzone.nordicsemi.com/thread/293532?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 11:36:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:888597e0-3283-4d43-a2a5-7c2c03b5b0f0</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="75873" url="~/f/nordic-q-a/71370/potential-dfu-process-bug"]Therefore, the controller shouldn&amp;#39;t be modifying its own offset into the part of the image to be sent, no?[/quote]
&lt;p&gt;Looking at the python script, then yes, it should modify the &lt;span style="text-decoration:line-through;"&gt;offset&lt;/span&gt;&amp;nbsp;size based on how many bytes that remains. If less than &amp;#39;max size&amp;#39; remains, you need to use the amount that remains, and not set it to max.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>