<?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>need DFU description explanations</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30311/need-dfu-description-explanations</link><description>Hello, 
 I&amp;#39;m started implementing DFU over serial port and see documentation from this link: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_dfu_transport_serial.html 
 And for me is misunderstanding about</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Dec 2019 09:09:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30311/need-dfu-description-explanations" /><item><title>RE: need DFU description explanations</title><link>https://devzone.nordicsemi.com/thread/227036?ContentTypeID=1</link><pubDate>Mon, 30 Dec 2019 09:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9e8e10b-6f54-4b68-96d6-128a9f38db12</guid><dc:creator>Somesh Burkule</dc:creator><description>[quote userid="26388" url="~/f/nordic-q-a/30311/need-dfu-description-explanations/120140"]That example is wrong, in fact. A PRN value 0x0100 means decimal 1, not decimal 256[/quote]
&lt;p&gt;Please confirm.&amp;nbsp; the following image shows its decimal 256.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/PRN_5F00_MTU_5F00_CMD.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: need DFU description explanations</title><link>https://devzone.nordicsemi.com/thread/120700?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 11:55:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f6aa981-d18a-416f-8bbb-1744a22e8a62</guid><dc:creator>ivansanchez</dc:creator><description>&lt;p&gt;Please do not ask a new question in a reply. It&amp;#39;s better to open a new question, and remember to explain as best as possible where those bytes appear, and when (what DFU commands have been sent before?).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: need DFU description explanations</title><link>https://devzone.nordicsemi.com/thread/120691?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 10:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbf0fd95-4001-47c6-b16b-5fa63a6618e8</guid><dc:creator>amicus</dc:creator><description>&lt;p&gt;I have one additional question according DFU start packets sending. I&amp;#39;ve found something strange. COuld You explain me please what&amp;#39;s happen?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to send:&lt;br /&gt; &lt;strong&gt;nrfutil dfu serial -pkg d:\nRF5_SDK_14.2.0_17b948a\examples\dfu\secure_dfu_test_images\serial\nrf52832\ble_app_buttonless_dfu_without_bonds_s132.zip -p COM14&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and sniffing on serial port and found hexadeciomal bytes:&lt;br /&gt;&lt;strong&gt;C0 D1 4E 01 E0 03 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 FC 9D 00 00 7C 45 C0&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I read DFU documentation from here:&lt;strong&gt;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_dfu_transport_serial.html"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t found 0xD1 in second byte and other bytes. What does it mean this hexadecimal bytes?&lt;br /&gt;C0 in begining and end is SLIP protocol markers this point I understand bytes what means other bytes I totaly not understand.&lt;/p&gt;
&lt;p&gt;Maybe I in wrong way and don&amp;#39;t understand main DFU things..&lt;/p&gt;
&lt;p&gt;Wait for comments!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: need DFU description explanations</title><link>https://devzone.nordicsemi.com/thread/120141?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 15:32:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4155a698-b2a7-429c-85c2-518100e39dbf</guid><dc:creator>amicus</dc:creator><description>&lt;p&gt;I think it&amp;#39;s a logical to have all value field in one (little endian) format. But of cause another talk when we talk about CRC field.&lt;/p&gt;
&lt;p&gt;Thank You, for fast help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: need DFU description explanations</title><link>https://devzone.nordicsemi.com/thread/120140?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 15:20:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9421df5-412f-4a60-b32d-0838b02ace28</guid><dc:creator>ivansanchez</dc:creator><description>&lt;blockquote&gt;What I should believe? Example or description?&lt;/blockquote&gt;
&lt;p&gt;I suggest you base your implementation in the already existing reference implementation: pc-nrfutil. See &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/tree/master/nordicsemi/dfu"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/tree/master/nordicsemi/dfu&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;In examples I see is big endian format (PRN number is 02 01 00 - it means 256) but in description is mentioned little endian format (&amp;quot;Value (uint16, little endian) &amp;quot;)&lt;/blockquote&gt;
&lt;p&gt;That example is wrong, in fact. A PRN value 0x0100 means decimal 1, not decimal 256.&lt;/p&gt;
&lt;p&gt;Refer to &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/7f20bb89b1df082990c94bc58ceb26393fe52341/nordicsemi/dfu/dfu_transport_serial.py#L299"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/blob/7f20bb89b1df082990c94bc58ceb26393fe52341/nordicsemi/dfu/dfu_transport_serial.py#L299&lt;/a&gt;, it looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;pre class="ui-code" data-mode="python"&gt;    def __set_prn(self):
        self.dfu_adapter.send_message([DfuTransportSerial.OP_CODE[&amp;#39;SetPRN&amp;#39;]]
        + map(ord, struct.pack(&amp;#39;&amp;lt;H&amp;#39;, self.prn)))&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you check &lt;a href="https://docs.python.org/2/library/struct.html#byte-order-size-and-alignment"&gt;https://docs.python.org/2/library/struct.html#byte-order-size-and-alignment&lt;/a&gt;&amp;nbsp;, you&amp;#39;ll see that&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;struct.pack(&amp;#39;&amp;lt;H&amp;#39;, self.prn)&lt;/pre&gt;&amp;nbsp;&lt;code&gt;&lt;/code&gt;means that PRN is a little-endian unsigned short (16-bit) integer. The same goes for all other fields involved in the DFU procedure, you&amp;#39;ll find similar struct.pack() calls.&lt;/p&gt;
&lt;p&gt;If I remember correctly, some of the metadata (in particular the crc32 hashes and sha256 hashes) might be in big-endian due to libraries used to calculate those values. Please be aware that you should check those separately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>