<?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>Upgrading Legacy Bootloader (SDK V11) to Secure Bootloader (SDK v17)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77562/upgrading-legacy-bootloader-sdk-v11-to-secure-bootloader-sdk-v17</link><description>I am attempting to update firmware on hardware already in the field. The firmware in the field is based of sdk v11 and has the legacy bootloader for OTA DFU. After some digging I found this post: 
 
 https://devzone.nordicsemi.com/f/nordic-q-a/18199/dfu</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Jul 2021 15:59:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77562/upgrading-legacy-bootloader-sdk-v11-to-secure-bootloader-sdk-v17" /><item><title>RE: Upgrading Legacy Bootloader (SDK V11) to Secure Bootloader (SDK v17)</title><link>https://devzone.nordicsemi.com/thread/320772?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 15:59:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b585195d-a000-40f8-a572-f54a0200b59b</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ahh this clears things up for me. I was using the new nrfutil package to generate the SDK v17 bootloader and softdevice package. I used this command:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --bootloader &lt;span&gt;secure_bootloader_ble_s132_pca10040&lt;/span&gt;.hex --bootloader-version 0 --softdevice &lt;span&gt;s132_nrf52_7.2.0_softdevice&lt;/span&gt;.hex --sd-req 0x0081 --output upgraded_bl_sd.zip&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This did not work. However, after using the same, old nrfutil tool package as I had used to create the custom bootloader, I was able to upload the new package containing SDK v17 bootloader and softdevice. That command was this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nrfutil.exe dfu genpkg --bootloader secure_bootloader_ble_s132_pca10040.hex --dev-revision 0xffff --softdevice s132_nrf52_7.2.0_softdevice.hex --dev-type 0xffff --sd-req 0xfffe dfu_bl_sd_sdk17.zip&lt;br /&gt;Zip created at dfu_bl_sd_sdk17.zip&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Once I created this package using the old nrfutil tool package I was able to complete the following steps successfully:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upload&amp;nbsp;the .zip package containing the custom bootloader to legacy based application.&lt;/li&gt;
&lt;li&gt;Upload another .zip package containing the new SDK v17 based secure bootloader and corresponding softdevice&lt;/li&gt;
&lt;li&gt;Upload the new application .zip package with updated firmware built with SDK v17&lt;/li&gt;
&lt;li&gt;I also confirmed that I was able to upload another version of the application with the same keys in order to prove the secure bootloader is operating realiably.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you so much for the help! I hope others are able to find this post helpful as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading Legacy Bootloader (SDK V11) to Secure Bootloader (SDK v17)</title><link>https://devzone.nordicsemi.com/thread/320631?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 08:50:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fe51ab3-8161-414b-94eb-fc814a82d049</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you tell how did you generate the .zip packet for the image of the SDK v17 bootloader and the S132 v7.2.0&amp;nbsp; ? Please provide the script you used to generate the .zip file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From my understanding you should use the old nrfutil and generate it the same way as you generated the custom bootloader.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The error Op Code = 02 means&amp;nbsp;OP_CODE_RECEIVE_INIT&lt;/p&gt;
&lt;p&gt;And status = 06 means&amp;nbsp;BLE_DFU_RESP_VAL_OPER_FAILED.&amp;nbsp;&lt;br /&gt;This suggested that there could be an issue with the init packet. You may want to put a breakpoint inside&amp;nbsp;on_ctrl_pt_write() and check how it handles&amp;nbsp;&lt;span&gt;OP_CODE_RECEIVE_INIT&lt;/span&gt; in the custom bootloader.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would suggest to try testing just updating the same custom bootloader (simply change bootloader version) just to check if the custom bootloader actually can DFU update itself.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading Legacy Bootloader (SDK V11) to Secure Bootloader (SDK v17)</title><link>https://devzone.nordicsemi.com/thread/320507?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 19:16:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d72a085a-556c-48e8-b299-fe3624d2f0d3</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using the custom bootloader from that post.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I carried out the following steps to in an attempt to upgrade my bootloader:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I rebuilt&amp;nbsp;the bootloader I was previously using on my project based on sdk v11 by replacing the dfu_dual_bank.c file with the one created by Bjorn with the additional fix.&lt;/li&gt;
&lt;li&gt;I built a dfu .zip package containing this new custom bootloader&amp;#39;s .hex file using the old version nrfutil program that works with sdk v11 projects.&lt;/li&gt;
&lt;li&gt;After connecting to my previously working project via nRF Connect app on an Android tablet I OTA DFU&amp;#39;d it with the new custom bootloader.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;All of this seemed to work and my custom bootloader and project were operating as normal.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Next I built the secure bootloader project from sdk v17 for the proper chip (nRF52832).&lt;/li&gt;
&lt;li&gt;I built another dfu .zip package containing this new bootloader and corresponding SoftDevice: s132 v7.2.0
&lt;ul&gt;
&lt;li&gt;I did not know whether or not to implement keys so I have tried this process from start to finish with this package containing keys and not.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;I attempted to OTA DFU this new upgraded bootloader and softdevice .zip package using the nRF Connect app on an Android tablet.&lt;/li&gt;
&lt;li&gt;The mobile app seemed to initiate DFU parameter properly but did received the response indicated earlier: (Op Code = 2, Status = 6)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In short, I am stuck attempting to use the custom bootloader to OTA DFU the new sdk v17 Secure Bootloader &amp;amp; Soft Device Package. Here is the output from the logs within nRF Connect.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20210716_2D00_150908.jpg" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20210716_2D00_150918.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I hope this clears things up, thanks for the help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading Legacy Bootloader (SDK V11) to Secure Bootloader (SDK v17)</title><link>https://devzone.nordicsemi.com/thread/320480?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 14:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb54385b-a142-45a6-8d1f-7e4a19f8084e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I assume you&amp;nbsp;testing using the custom bootloader made by Bjørn in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/18199/dfu---updating-from-legacy-sdk-v11-0-0-bootloader-to-secure-sdk-v12-x-0-bootloader"&gt;this case&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please describe step by step what you did and what&amp;#39;s the result.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Has the custom bootloader boot and running, at which step do you receive Op Code 2 status 6 ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>