<?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>nrfutil package file.dat format</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53322/nrfutil-package-file-dat-format</link><description>I&amp;#39;m trying to simplify the open_bootloader example from SDK 15.3. I&amp;#39;m getting rid of version, signature and keep only the CRC validation. I&amp;#39;m actually trying to understand the format of the .dat file from the zip file nrfutil create but can&amp;#39;t find documentation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Nov 2019 12:17:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53322/nrfutil-package-file-dat-format" /><item><title>RE: nrfutil package file.dat format</title><link>https://devzone.nordicsemi.com/thread/219274?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2019 12:17:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7578f78-49d5-4c1d-a8aa-4c124dd7cf24</guid><dc:creator>Frederic</dc:creator><description>&lt;p&gt;In the end I was able to generate the init packet using something like this:&lt;/p&gt;
&lt;p&gt;uint8_t tempbuffer[256];&lt;/p&gt;
&lt;p&gt;dfu_packet_t m_packet = DFU_PACKET_INIT_DEFAULT;&lt;br /&gt; pb_ostream_t stream = pb_ostream_from_buffer(tempbuffer, sizeof(tempbuffer));&lt;/p&gt;
&lt;p&gt;m_packet.has_command = true;&lt;br /&gt; m_packet.command.has_op_code = true;&lt;br /&gt; m_packet.command.op_code = DFU_OP_CODE_INIT;&lt;/p&gt;
&lt;p&gt;m_packet.command.has_init = true;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;pb_encode(&amp;amp;stream, dfu_packet_fields, &amp;amp;m_packet);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for the Uart protocol I found this which was helpfull:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/jimmywong2003/nrf-slim-serial-uart-dfu-host-c-code"&gt;https://github.com/jimmywong2003/nrf-slim-serial-uart-dfu-host-c-code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this help someone someday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil package file.dat format</title><link>https://devzone.nordicsemi.com/thread/215581?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 15:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7ae3729-203c-44b7-8c3e-1a7a9e9c4c15</guid><dc:creator>Frederic</dc:creator><description>&lt;p&gt;Maybe it&amp;#39;s going to end up like this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil package file.dat format</title><link>https://devzone.nordicsemi.com/thread/215564?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 14:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:838c4c82-b68e-4e56-a24f-507a63708d05</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Does the .dat file need to be generated locally on the microcontroller? Maybe you can just distribute it together with the binary image? The Microcontroller does not need to know the content of the init command to perform DFU.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil package file.dat format</title><link>https://devzone.nordicsemi.com/thread/215557?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 14:02:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:616ef339-3f03-4be6-9529-0d18bc264fcb</guid><dc:creator>Frederic</dc:creator><description>&lt;p&gt;My final goal is to get rid of nrfutil and be able to create the data from the .dat file on a microcontroller. If the only validation left is a CRC I think it&amp;#39;s possible but I have a lot of difficulty to find how to create the .dat file. I am looking at the nrfutil Python code but I think I&amp;#39;ll have to get better at Python to complete this task. I have use google protobuf to modify the init packet but wasn&amp;#39;t able to modify nrfutil code with the new packet format. I&amp;#39;ll keep digging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil package file.dat format</title><link>https://devzone.nordicsemi.com/thread/215544?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 13:28:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a1bf793-8714-4b32-8719-a8ebd9e9a64b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The init packet is serialized with google protobuf, please take a look at &amp;quot;&lt;span&gt;&lt;a title="Customizing the init packet" href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_customizing.html?cp=6_5_8"&gt;Customizing the init packet&lt;/a&gt;&amp;quot; for more details. However, changing the format requires modification to both nrfutil and the protobuf parser inside the bootloader. So I would not recommend it if the goal is to simplify the bootloader. Instead,&amp;nbsp;you should consider making&amp;nbsp;the bootloader ignore the parameters you don&amp;#39;t need. nrf_dfu_validation.c is the file you want to modify.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>