<?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>Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91951/questions-of-dfu-over-ble-example</link><description>Dear all 
 I following the example here , over the air one, and get it basically working, thanks for the tutorial. 
 Now I have a few questions: 
 1. It looks like it always keep 2 images at Slot 0 and slot 1, one active at a time, after I Uploaded successfully</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Sep 2022 11:36:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91951/questions-of-dfu-over-ble-example" /><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386617?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 11:36:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dba0a026-ac04-461d-8126-16de4800de7b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ping,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad you found my answers helpful. I would prefer if you could create a new ticket for questions not directly related to the original topic as it better fits the Q&amp;amp;A style of this forum. Long threads are generally hard to follow for others who may be looking for the same answers.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386606?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 11:21:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a4fa6e4-81c7-4748-9204-691c0a47d8f1</guid><dc:creator>PingISTL</dc:creator><description>&lt;p&gt;Thank you, Vidar&lt;/p&gt;
&lt;p&gt;You solved my another puzzle.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;have a few more questions about the Device&amp;nbsp;Management mobile app, shall I carry on asking here or start a new ticket? You already done a great job in this ticket.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Ping&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386600?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 11:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca74f1c9-84ed-4274-bd7c-c71e6474765d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In vs code you now have to press this button to do a pristine build:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1663325946825v1.png" alt=" " /&gt;&lt;/p&gt;
[quote user="PingISTL"]So the procedure for future production is like what I just did?&amp;nbsp;and keep the key file safe? If anyone uploaded another file, it won&amp;#39;t work.[/quote]
&lt;p&gt;Yes, correct. If others get access to the private key, they will be able to create and distribute FW updates for your device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386591?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 10:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fab1f26-b894-4a69-bb6c-9550167f220a</guid><dc:creator>PingISTL</dc:creator><description>&lt;p&gt;Hi, Vidar&lt;/p&gt;
&lt;p&gt;Thank you for your help - I tried to do a clean build and it shows which key file is used only with a clean build. BTW - I have to do a clean build by remove the build and add again as I don&amp;#39;t see the pristine option in VS code ACTIONS window now since a upgrade.&lt;/p&gt;
&lt;p&gt;Then I factory programmed the image.hex into the board, and also tried to load&amp;nbsp;a update file with default key. It updated successfully, but it doesn&amp;#39;t run and log says&amp;nbsp;&amp;quot;E: Image in the secondary slot is not valid!&amp;quot;&lt;/p&gt;
&lt;p&gt;I suppose this is expected. It works if I upload a new build file with same key file.&lt;/p&gt;
&lt;p&gt;So the procedure for future production is like what I just did?&amp;nbsp;and keep the key file safe? If anyone uploaded another file, it won&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;Regards!&lt;/p&gt;
&lt;p&gt;Ping&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386562?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 09:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa76b39c-9085-48c2-9699-5bdea53b8581</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ping,&lt;/p&gt;
&lt;p&gt;The build log will state which key file is used. You can always try do DFU with the default key again to verify that the update gets rejected to be absolutely sure.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386559?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 09:17:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b0b3131-ce70-411e-9d0c-ed069cb32108</guid><dc:creator>PingISTL</dc:creator><description>&lt;p&gt;Hi, Vidar&lt;/p&gt;
&lt;p&gt;I did follow your steps and build successfully, I have not seen any warning message about the default keys are being used, does it mean I am using my own generated key now?&lt;/p&gt;
&lt;p&gt;is there any other way to know this after build?&lt;/p&gt;
&lt;p&gt;Ping&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386544?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 08:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c21c5be-82f7-4c3f-9ba6-c4e6019e48d4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ping,&lt;/p&gt;
&lt;p&gt;Assuming you have made the child image folder as I outlined in my initial reply, the next step would be to build the project. You can check the build log to confirm that your key is being used.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386439?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 14:52:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7477eee2-4f27-4256-828d-1749c65f4eea</guid><dc:creator>PingISTL</dc:creator><description>&lt;p&gt;Hi, Vidar&lt;/p&gt;
&lt;p&gt;Thanks for point out, imgtool is installed although I don&amp;#39;t know where it is, but I generated a key file and put it into the keys folder created according to your instruction.&lt;/p&gt;
&lt;p&gt;Now what is the next step please? I am not fully understand the final step you mentioned and the link,&amp;nbsp;could you specify a bit more please?&lt;/p&gt;
&lt;p&gt;Regards!&lt;/p&gt;
&lt;p&gt;Ping&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386422?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 13:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cf1cdf2-0d82-4fa2-9a88-c78b8b1f08ca</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Ping,&lt;/p&gt;
&lt;p&gt;The imgtool is included in the SDK toolchain. Try to open the terminal from the Toolchain manager app, then run &amp;#39;imgtool&amp;#39; from the terminal to verify that it is installed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386417?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 13:44:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8517dc9c-814f-48af-8677-11c37284c95d</guid><dc:creator>PingISTL</dc:creator><description>&lt;p&gt;Hello, Vidar&lt;/p&gt;
&lt;p&gt;Thanks for reply.&lt;/p&gt;
&lt;p&gt;1. I tried and it works with confirm only. Also read a bit more on image&amp;nbsp;uploading procedure and know a bit more now.&lt;/p&gt;
&lt;p&gt;2. I am stuck in&amp;nbsp;generating new key pair, it seems like I need to install the&amp;nbsp;image tool first according to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/imgtool.html"&gt;link&amp;nbsp;&lt;/a&gt;, I opened cmd window&amp;nbsp;and tried following and got a error message below. Sorry, I am not familiar with python, and need more help here to install the tool. I am a windows user.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1663249228200v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Could you help further please?&lt;/p&gt;
&lt;p&gt;Ping&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386359?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 11:12:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:229c9da6-5d97-442f-9603-7593271771b1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;These options are relevant when working on the 53 series which as multiple upgradable images. On the nRF52 series you only have one, so you can select the &amp;quot;application core&amp;quot; option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386358?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 11:11:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40654ac-f222-45ed-bc90-f60858758c7f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;1. The bootloader will only boot images from slot 0 unless you enable&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#equal-slots-direct-xip"&gt; direct-xip &lt;/a&gt;(not enabled by default). Also, after DFU, you need to confirm the image in slot 0. Otherwise, the bootloader will end up restoring the old image from slot 1 on next boot.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to select &amp;quot;Confirm Only&amp;quot; when initiating DFU from the basic menu? This should make the phone confirm the image right after the DFU is finished, rather than waiting for the new app to boot up and confirm it then.&lt;/p&gt;
&lt;p&gt;2. For production builds, you should always use your own secret private key to sign the image. First step is to create a key pair, which you can do by following the instructions here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html#generating-a-new-keypair"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html#generating-a-new-keypair&lt;/a&gt;.&amp;nbsp; The final step is to pass this private key to the build. &lt;/p&gt;
&lt;p&gt;Steps to change the private key used by MCUboot (see the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html#image-specific-variables"&gt;Image-specific variables&lt;/a&gt; section of the SDK documentation for details on how this works)&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;a. In your project directory, create a folder named &amp;quot;child_image&amp;quot; with a sub-directory named mcuboot&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;b. In &amp;#39;mcuboot&amp;#39;, create a file named &amp;quot;prj.conf&amp;quot; which will override the default mcuboot configuration. This file should include CONFIG_BOOT_SIGNATURE_KEY_FILE=&amp;quot;keys/&amp;lt;filename&amp;gt;.pem&amp;quot; along with the other default mcuboot configurations. You may use the child_image.zip folder attached below as a reference.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;c. adjacent to the the prj.conf file, make a new &amp;quot;key&amp;quot; folder where you will keep your key.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;d. Now the folder structure should look like this:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;├── child_image&lt;br /&gt;│&amp;nbsp;&amp;nbsp; └── mcuboot&lt;br /&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ├── keys&lt;br /&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; │&amp;nbsp;&amp;nbsp; └── mcuboot_private.pem&lt;br /&gt;│&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; └── prj.conf&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;span&gt;CONFIG_MCUMGR_SMP_BT_AUTHEN means the phone must be paired with MITM protection before it can initiate DFU (i.e. pairing with passkey, nummeric comparison, or OOB with NFC). It does not affect the DFU process itself. You can still use the same update images as when the authentication requirement is disabled.&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attachment&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2134.child_5F00_image.zip"&gt;devzone.nordicsemi.com/.../2134.child_5F00_image.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Questions of DFU over BLE example</title><link>https://devzone.nordicsemi.com/thread/386143?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 11:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:775d4479-e36b-465b-95eb-23b6bb48985f</guid><dc:creator>PingISTL</dc:creator><description>&lt;p&gt;one more please, 4 . after choose SELECT FILE, and hit UPLOAD button, some time it pops up with a Select Image interface with options - Application Core(0), Network core(1), Image(2) and Image (3).&lt;/p&gt;
&lt;p&gt;What does it mean and what option shall i choose if I just wan to upload the new image?&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ping&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>