<?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>SDK 15.3 Add custom DFU settings fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54018/sdk-15-3-add-custom-dfu-settings-fails</link><description>I want to save encryption state in DFU to the nrf_dfu_settings_t structure. I put a new 16-byte field at the end of the structure after nrf_dfu_adv_name_t adv_name; and whenever I restart the bootloader the state is erased. All the other fields are preserved</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2019 09:25:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54018/sdk-15-3-add-custom-dfu-settings-fails" /><item><title>RE: SDK 15.3 Add custom DFU settings fails</title><link>https://devzone.nordicsemi.com/thread/219405?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2019 09:25:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32984d74-3c41-44a1-93ed-67782f387dc3</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello, I am sorry for the late reply. I don&amp;#39;t see any consequences of the modification right away since you are keeping the size (offset) the same,&amp;nbsp;and generating settings page with nrfutil should still work (I think).&lt;/p&gt;
&lt;p&gt;However, I don&amp;#39;t have a complete overview and can&amp;#39;t give you a guarantee that the modification won&amp;#39;t cause unwanted behavior.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;div style="left:436px;top:-6px;"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3 Add custom DFU settings fails</title><link>https://devzone.nordicsemi.com/thread/218389?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 01:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:340c4bbe-c0f5-4ead-a254-f0d5ef8db0e6</guid><dc:creator>Jefferson</dc:creator><description>&lt;p&gt;It seems to work if I add my custom field in &lt;span&gt;nrf_dfu_settings_t&amp;nbsp;&lt;/span&gt;like this:&lt;/p&gt;
&lt;p&gt;uint8_t init_command[INIT_COMMAND_MAX_SIZE - 16]; /**&amp;lt; Buffer for storing the init command. */&lt;br /&gt; uint8_t custom[16];&lt;/p&gt;
&lt;p&gt;uint32_t boot_validation_crc;&lt;br /&gt;boot_validation_t boot_validation_softdevice;&lt;br /&gt;boot_validation_t boot_validation_app;&lt;br /&gt;boot_validation_t boot_validation_bootloader;&lt;/p&gt;
&lt;p&gt;nrf_dfu_peer_data_t peer_data; /**&amp;lt; Not included in calculated CRC. */&lt;br /&gt;nrf_dfu_adv_name_t adv_name; /**&amp;lt; Not included in calculated CRC. */&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It did not work when I added&amp;nbsp;&lt;span style="font-family:inherit;"&gt;like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;uint8_t init_command[INIT_COMMAND_MAX_SIZE]; /**&amp;lt; Buffer for storing the init command. */&lt;/p&gt;
&lt;p&gt;uint32_t boot_validation_crc;&lt;br /&gt; boot_validation_t boot_validation_softdevice;&lt;br /&gt; boot_validation_t boot_validation_app;&lt;br /&gt; boot_validation_t boot_validation_bootloader;&lt;/p&gt;
&lt;p&gt;nrf_dfu_peer_data_t peer_data; /**&amp;lt; Not included in calculated CRC. */&lt;br /&gt; nrf_dfu_adv_name_t adv_name; /**&amp;lt; Not included in calculated CRC. */&lt;/p&gt;
&lt;p&gt;&lt;span&gt;uint8_t custom[16];&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is it ok to do it the first way by using the last 16 bytes from the init_command buffer?&amp;nbsp; I will not be using large init commands.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>