<?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>SoftDevice size value in DFU init packet</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73877/softdevice-size-value-in-dfu-init-packet</link><description>Hello, 
 We are using nRF52840 with SDK 15.2.0, a bootloader and the SoftDevice 6.1.0. We are able to perform a DFU for our application by downloading the .bin and .dat files of the new firmware in Flash memory, to fill the DFU settings structure with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Apr 2021 09:41:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73877/softdevice-size-value-in-dfu-init-packet" /><item><title>RE: SoftDevice size value in DFU init packet</title><link>https://devzone.nordicsemi.com/thread/305247?ContentTypeID=1</link><pubDate>Fri, 16 Apr 2021 09:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5772bdca-94f4-4df0-9925-c9e3d489e09a</guid><dc:creator>Pierre cgwi22</dc:creator><description>&lt;p&gt;Thanks for the link, that&amp;#39;s exactly what we needed. So for our SoftDevice size in the init packet, we can see these bytes starting at position 20:&lt;/p&gt;
&lt;p&gt;0xE8 0x9B 0x09&lt;br /&gt;==&amp;gt; 11101000 10011011 00001001&lt;br /&gt;==&amp;gt; 0001001 0011011 1101000 after removing MSB and reverse order&lt;br /&gt;==&amp;gt; 151016 in decimal so now it works.&lt;/p&gt;
&lt;p&gt;Our problem is solved, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice size value in DFU init packet</title><link>https://devzone.nordicsemi.com/thread/304881?ContentTypeID=1</link><pubDate>Wed, 14 Apr 2021 14:41:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c80b09c-9409-4f4a-bfee-ba16fa63cc9b</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You cannot read values directly out of the file in hex like that, due to the way integers are stored in the protobuf format. Values 0-127 will read as normal, but anything above that will be different. Also, the number of bytes used for each value will vary, so the location of values may change depending on the size of the previous values. For details on the encoding, see the &lt;a href="https://developers.google.com/protocol-buffers/docs/encoding"&gt;Encoding&lt;/a&gt; chapter of the Protocol Buffers developer guide from Google.&lt;/p&gt;
&lt;p&gt;For reading out the values, I recommend using a protobuf reading library. You can also have a look at the &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/tree/master/nordicsemi/dfu"&gt;nrfutil sourc&lt;/a&gt;e for reference.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice size value in DFU init packet</title><link>https://devzone.nordicsemi.com/thread/304715?ContentTypeID=1</link><pubDate>Wed, 14 Apr 2021 07:38:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b3fd221-75f1-45bf-9dad-5c6c52336481</guid><dc:creator>Pierre cgwi22</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your answer, but even with the protobuf, the &lt;em&gt;dfu-cc.pb.c&lt;/em&gt; and &lt;em&gt;dfu-cc.pb.h&lt;/em&gt; files, the fields do not seem to be what we can see in the init packet (.dat file).&lt;/p&gt;
&lt;p&gt;We use nRF Util version 5.2.0 and this is the result of the &amp;quot;pkg display&amp;quot; command with the corresponding data. We have found some of the values but not the bootloader and SoftDevice sizes:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/969x649/__key/communityserver-discussions-components-files/4/init_5F00_packet.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice size value in DFU init packet</title><link>https://devzone.nordicsemi.com/thread/304478?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 10:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62aab6bc-535b-4d12-ba51-651e774b5839</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;De format of the init file (the .dat file in the zip) is &lt;a href="https://developers.google.com/protocol-buffers"&gt;protocol buffers&lt;/a&gt; (protobuf), and the contents is defined in the file at &amp;lt;sdk folder&amp;gt;/components/libraries/bootloader/dfu/dfu-cc.proto.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>