<?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>Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65790/bootloader-and-softdevice-update-using-thread-secure-dfu</link><description>nRF5 SDK for Thread and Zigbee v4.1.0 documentation states that only application can be updated over Thread Secure DFU. However, nRF5 SDK for Thread and Zigbee v2.0.0 documentation says: &amp;quot;Thread Secure DFU accepts images that contain a new bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 17 Jan 2021 22:18:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65790/bootloader-and-softdevice-update-using-thread-secure-dfu" /><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/289593?ContentTypeID=1</link><pubDate>Sun, 17 Jan 2021 22:18:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93d7ba69-af00-4db3-a5a3-fe9b6d0beeaa</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We have now been successful in creating an application that allows you to update from SDK 2.0.0 to SDK 4.1.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Starting out with the Thread DFU client example in SDK 2.0.0, replace the following two files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu_5F00_settings.c"&gt;devzone.nordicsemi.com/.../nrf_5F00_dfu_5F00_settings.c&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu_5F00_validation.c"&gt;devzone.nordicsemi.com/.../nrf_5F00_dfu_5F00_validation.c&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have tested that I&amp;#39;m able to perform DFU using the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Flash original bootloader and DFU client from SDK 2.0.0&lt;/li&gt;
&lt;li&gt;Upgrade application to &amp;quot;middle application&amp;quot;, built from SDK 2.0.0 with the above files.&lt;/li&gt;
&lt;li&gt;Upgrade bootloader to SDK 4.1.0.&lt;/li&gt;
&lt;li&gt;Upgrade application to DFU client from SDK 4.1.0.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let me know if you are not able to upgrade using these files.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/286156?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 18:36:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a3aa042-8ef0-4c34-bd64-c236fe22fe0e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately we have not been able to create a working&amp;nbsp;application for the middle update before Christmas vacation. Our developers will continue to look into this after the holidays, and we hope to get this done soon.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/284890?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 19:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4969f3e-35d4-4884-92ff-67c0ab3de36a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately, the middle application is not done yet. I think I have managed to create the correct settings page, but the client does not enter the correct state to complete the DFU process with these changes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our Thread developers are looking into this as well, to try and speed up the process.&lt;/p&gt;
&lt;p&gt;Hope to get back to you with some good news soon!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/284698?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 08:42:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:831f0c09-2cde-4349-a60c-86421ab44c8e</guid><dc:creator>kristofbo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have any update on this matter?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Krzysztof&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/282817?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 09:02:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6caa19ce-2245-48de-b212-6ffde477e259</guid><dc:creator>kristofbo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the good news. Waiting for your results.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Krzysztof&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/282290?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 14:30:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a677c655-3c4b-4a3d-afc7-e25ef2a056e4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry again for the slow response.&lt;/p&gt;
&lt;p&gt;I think I have tracked down the problem to the change in bootloader settings that happened between nRF5 SDK v15.2.0 and v15.3.0. What happens is this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When updating the bootloader from Thread SDK v2.0.0 to v4.1.0, the new bootloader supports the new bootloader settings format.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;After bootloader update, the bootloader detects the old settings format in flash and upgrades this to the new format.&lt;/li&gt;
&lt;li&gt;The Thread DFU client application still only supports the old bootloader settings format, since this is based on SDK 2.0.0.&lt;/li&gt;
&lt;li&gt;When the application transfer is completed, the old Thread DFU client will write the settings in the old format to flash. This is not detected by the bootloader, as it is not in the format it expects. The valid application in bank1 is therefore not detected.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I discussed this with one of my colleagues, and he suggest that in this case it would be required to first update a &amp;quot;middle application&amp;quot; that supports both settings formats. It will go something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;settings-version = read(bootloader_settings)

if (settings-version==1):
    write(old_settings_format)
else if (settings-version==1):
    write(new_settings_format)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I will try to implement something like this in the beginning of next week, to se if this resolves the issue.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/280414?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 15:15:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c9f3852-bc6d-4b6c-95d3-89b8d88f99ff</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the slow response on this. I have verified that the bootloader is updated correctly, but still struggling to determine&amp;nbsp;why the newly received application is not activated.&lt;/p&gt;
&lt;p&gt;I will continue to work on this the next few days, hoping to have an answer for you soon.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/278808?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 14:19:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01fdc3a4-85ad-4d92-8173-6d6109faf8d1</guid><dc:creator>kristofbo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for looking into this.&lt;br /&gt;Please just let me know if you need some assistance with above setup.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Krzysztof&lt;/p&gt;
&lt;div style="left:97px;position:absolute;top:61.8px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/278667?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 16:44:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca83e353-9171-4382-b797-c4ae01ceb961</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tested following your instructions, but I&amp;#39;m not able to update the bootloader/firmware correctly.&lt;/p&gt;
&lt;p&gt;Will test more tomorrow with more debugging enabled, and will also compare the flash content to see what happens.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/278324?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 16:24:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3966750a-0f6f-42a2-b054-e4959d1d89d6</guid><dc:creator>kristofbo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;br /&gt;I&amp;#39;ve performed the upgrade test but unfortunately it failed...&lt;/p&gt;
&lt;p&gt;Scenario:&lt;br /&gt;1. Flash bootloader and application&lt;br /&gt;2. Perform bootloader DFU&lt;br /&gt;3. Perform application DFU&lt;/p&gt;
&lt;p&gt;Above scenario works fine but only when all software components comes from the same SDK version, i.e. all from SDK 2.0 or all from SDK 4.1.&lt;br /&gt;However it does not work when upgrading from SDK 2.0 to SDK 4.1 like in below scenario:&lt;br /&gt;1. Flash bootloader and application based on SDK 2.0&lt;br /&gt;2. Perform bootloader DFU based on SDK 4.1&lt;br /&gt;3. Perform application DFU based on SDK 4.1&lt;/p&gt;
&lt;p&gt;In step 2. bootloader has been flashed and started successfully - which was indicated by LED3 being lit up, when bootloader started.&lt;br /&gt;In step 3. the application has been downloaded and reset after DFU was performed, however the&amp;nbsp;application was not activated by bootloader for some reason, and old application was started (the new application should lit up LED2, but it was not there is in this case).&lt;/p&gt;
&lt;p&gt;Below you can see all instructions which you can just copy-paste it in order to reproduce this issue.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download SDK 2.0 and 4.1 a extract them in corresponding folders (e.g. sdk-2.0 and sdk-4.1).&lt;/li&gt;
&lt;li&gt;Go to SDK 2.0 DFU folder&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd &amp;lt;your-path&amp;gt;/sdk-2.0
cd examples/thread/dfu&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Create cryptographic keys&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil keys generate priv.pem
nrfutil keys display --key pk --format code priv.pem --out_file dfu_public_key.c
cp dfu_public_key.c ../../dfu/&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Install micro-ecc&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;pushd ../../../external/micro-ecc
git clone https://github.com/kmackay/micro-ecc
pushd nrf52hf_armgcc/armgcc
make
popd
popd&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Build bootloader&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;make -C bootloader/pca10056/blank/armgcc&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Prepare the DFU Client&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;sed -i.backup &amp;#39;s/#define BACKGROUND_DFU_CONFIG_LOG_LEVEL 3/#define BACKGROUND_DFU_CONFIG_LOG_LEVEL 4/g&amp;#39; client/pca10056/blank/config/sdk_config.h
make -C client/pca10056/blank/armgcc
nrfutil settings generate --family NRF52840 --application client/pca10056/blank/armgcc/_build/nrf52840_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex
mergehex -m client/pca10056/blank/armgcc/_build/nrf52840_xxaa.hex settings.hex -o dfu_client.hex&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Flash&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -f nrf52 --eraseall
nrfjprog -f nrf52 -r --program ../../../components/softdevice/mbr/nrf52840/hex/mbr_nrf52_2.3.0_mbr.hex --chiperase
nrfjprog -f nrf52 -r --program bootloader/pca10056/blank/armgcc/_build/nrf52840_xxaa_mbr.hex --sectoranduicrerase
nrfjprog -f nrf52 -r --program dfu_client.hex --sectorerase&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Go to SDK 4.1 DFU folder&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd &amp;lt;your-path&amp;gt;/sdk-4.1
cd examples/thread/dfu&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Copy cryptographic keys created in SDK 2.0&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;cp ../../../../sdk-2.0/examples/thread/dfu/dfu_public_key.c ../../dfu/
cp ../../../../sdk-2.0/examples/thread/dfu/priv.pem .&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Install micro-ecc&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;pushd ../../../external/micro-ecc
git clone https://github.com/kmackay/micro-ecc
pushd nrf52hf_armgcc/armgcc
make
popd
popd&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Prepare app firmware package&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;sed -i.backup &amp;#39;s/thread_bsp_init();/thread_bsp_init(); LEDS_ON(BSP_LED_1_MASK);/g&amp;#39; client/main.c
make -C client/pca10056/blank/armgcc
nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application-version 2 --application client/pca10056/blank/armgcc/_build/nrf52840_xxaa.hex --key-file priv.pem app_dfu_package.zip&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Prepare bootloader firmware package&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;sed -i.backup &amp;#39;s/leds_init();/leds_init(); LEDS_ON(BSP_LED_3_MASK);/g&amp;#39; bootloader/main.c
sed -i.backup &amp;#39;s/#define NRF_BL_DFU_ENTER_METHOD_BUTTON 0/#define NRF_BL_DFU_ENTER_METHOD_BUTTON 1/g&amp;#39; bootloader/pca10056/blank/config/sdk_config.h
make -C bootloader/pca10056/blank/armgcc
nrfutil pkg generate --hw-version 52 --sd-req 0x00 --bootloader-version 2 --bootloader bootloader/pca10056/blank/armgcc/_build/nrf52840_xxaa_mbr.hex --key-file priv.pem bl_dfu_package.zip&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Perform bootloader DFU&lt;/li&gt;
&lt;li&gt;Perform application DFU&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I can send you logs from the whole process if you want.&lt;/p&gt;
&lt;p&gt;Could you please check if this scenario is working for you? This is important for us,&amp;nbsp;since it blocks us from upgrading to SDK 4.1.&lt;/p&gt;
&lt;p&gt;Could you also tell if it&amp;#39;s possible to downgrade bootloader and application from SDK 4.1 to SDK 2.0?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Krzysztof&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/272331?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2020 13:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7758b980-963a-48e0-9430-e8c5a9805c9a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the slow response to this. I checked with our developers and they did not see any reasons that bootloader updates should not be possible over the Thread network.&lt;/p&gt;
&lt;p&gt;I verified this by doing a bootloader update and check that the updates are received. I followed the instructions on &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_example_dfu.html#thread_example_dfu_test"&gt;this page&lt;/a&gt;, however in step 5, I did the following changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add the line &amp;quot;&lt;span&gt;LEDS_ON(BSP_LED_3_MASK);&amp;quot; after &amp;quot;leds_init();&amp;quot; in main() function of&amp;nbsp;Thread Secure Bootloader project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Modify sdk_config.h file of&amp;nbsp;Thread Secure Bootloader project to set &amp;quot;#define NRF_BL_DFU_ENTER_METHOD_BUTTON 1&amp;quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Generate DFU packet using following command:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil pkg generate --hw-version 52 --sd-req 0x00 --bootloader-version 2 --bootloader bootloader\pca10056\blank\armgcc\_build\nrf52840_xxaa.hex --key-file priv.pem bl_dfu_package.zip&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;When the DFU is completed in step 7, hold Button 4 of the board while power cycling it. This will enter the bootloader, and you should observe that LED4 is lit up.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will create an internal ticket for getting the documentation revised to avoid confusion.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and SoftDevice update using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/269307?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 08:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1b7edbc-0cb2-41ed-9632-36dc99a7dc38</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m checking with our Thread team what your options are and what is supported in the SDK. I will get back to you as soon as I receive their response.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>