<?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 Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43698/bootloader-serial-dfu-without-softdevice-sdk-15</link><description>Hi there, 
 NRF 52840 Preview DK nRF5_SDK_15.2.0_9412b96 IAR for ARM 7.60.1 
 I need some information on how to do Serial DFU (UART/USB) with Bootloader, without Soft Device. From all the information I&amp;#39;ve gathered, including: 
 devzone.nordicsemi.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 16 Feb 2019 00:08:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43698/bootloader-serial-dfu-without-softdevice-sdk-15" /><item><title>RE: Bootloader Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/thread/171489?ContentTypeID=1</link><pubDate>Sat, 16 Feb 2019 00:08:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d19df8b-3a95-442c-b504-dceb39cf9b0d</guid><dc:creator>Cecylia</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;br /&gt;&lt;br /&gt;Thanks!&amp;nbsp; I did use the wrong port.&amp;nbsp;&amp;nbsp;However, I have a very hard time to enumerate the USB for this Bootloader.&amp;nbsp; It only got enumerated properly once by my Windows (and then it shows &amp;quot;nRF52&amp;quot;, if I&amp;#39;m not mistaken, on the Device Manager).&amp;nbsp; Then I could upgrade the firmware application successfully.&lt;br /&gt;&lt;br /&gt;However, I&amp;#39;ve been having a really hard time to get it enumerated by the Windows, so that I can&amp;#39;t test the FW upgrade smoothly.&amp;nbsp; Since it might be a separate issue, I opened another ticket for that:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43776/bootloader-usb-fails-to-enumerate-device-on-windows-10-nrf-54820-development-kit"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/43776/bootloader-usb-fails-to-enumerate-device-on-windows-10-nrf-54820-development-kit&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But, I could see that the steps you explained worked!&amp;nbsp; Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/thread/171296?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 08:22:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54887651-7490-4d61-9a9a-851bef55ad34</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;The nRF USB is located here:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78a1c8520c3646e194aa7e7e8751d116/20190215_5F00_090744.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/thread/171295?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 08:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e039317-df54-4ced-9240-3f8bcaf1c1f8</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi again.&lt;/p&gt;
&lt;p&gt;I think your issue now is that you have wrong COM port.&lt;/p&gt;
&lt;p&gt;You have to use the COM port number that you have connected to the &lt;strong&gt;nRF USB:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If i choose &lt;strong&gt;WRONG&lt;/strong&gt; COM port, I get following output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78a1c8520c3646e194aa7e7e8751d116/pastedimage1550218380316v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;With the &lt;strong&gt;CORRECT&lt;/strong&gt; COM port, I get the following output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78a1c8520c3646e194aa7e7e8751d116/pastedimage1550218421769v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="cecyliaw"]Then what is the benefit of using USB? I&amp;#39;m trying to evaluate which one I should implement for our product.[/quote]
&lt;p&gt;&amp;nbsp;This depends on what product you wish to make, if you make something that uses USB it might be suitable to update it by using the USB. Also USB is not doing anything Over the Air (OTA), so this gives you more security if the other alternative is a BLE bootloader which does not have bonding.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/thread/171269?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 03:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1707f94-e95b-45c2-be68-7a2b59993dd3</guid><dc:creator>Cecylia</dc:creator><description>&lt;p&gt;Andreas, actually I just remembered that our production HW is using USB only, so we&amp;#39;ll have to use USB.&amp;nbsp; Please let me know why I couldn&amp;#39;t run the USB example..&amp;nbsp; Thanks &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/thread/171244?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 21:38:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ab7193d-b413-48a5-8c97-e043c036b283</guid><dc:creator>Cecylia</dc:creator><description>&lt;p&gt;Andreas,&lt;br /&gt;&lt;br /&gt;Thanks for the detailed answer!&amp;nbsp; That&amp;#39;s very helpful.&amp;nbsp; I was able to upgrade via UART by replacing step 7 with:&lt;br /&gt;nrfutil dfu serial -pkg my_blinky_mbr.zip -p COM11&lt;br /&gt;&lt;br /&gt;About your answer &amp;quot;&lt;span&gt;The difference between the two bootloaders are that the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;USB&lt;/strong&gt;&lt;span&gt;&amp;nbsp;bootloader does not require a signature for the Application and so on, it only requires for the bootloader. The&amp;nbsp;&lt;/span&gt;&lt;strong&gt;UART&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;bootloader on the other hand is &amp;quot;secure&amp;quot; and requires a signature for all the components (like the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;BLE&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;bootloader).&amp;quot;&amp;nbsp; &lt;br /&gt;Then what is the benefit of using USB? I&amp;#39;m trying to evaluate which one I should implement for our product.&lt;br /&gt;&lt;br /&gt;Also, I tried to use the &lt;strong&gt;USB&lt;/strong&gt; example by doing the previous steps, but replacing the following:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3) secure-bootloader_usb_mbr_pca10056&lt;/p&gt;
&lt;p&gt;4) mergehex --merge settings.hex secure_bootloader_usb_mbr_pca10056.hex --output output.hex&lt;/p&gt;
&lt;p&gt;7) nrfutil dfu usb_serial -pkg my_blinky_mbr.hex -p COM11&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But I got the following error.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1550180217834v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;Does the USB example require an additional step?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader Serial DFU without SoftDevice (SDK 15)</title><link>https://devzone.nordicsemi.com/thread/171045?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 09:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2171da0f-e586-4a0d-9556-6bfec5c6d204</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I think your problem is that you have used the wrong &lt;strong&gt;nrfutil&lt;/strong&gt; command to start the DFU.&lt;/p&gt;
&lt;p&gt;As I understand, you wish to do a DFU without using the SoftDevice, that is a DFU over a &lt;strong&gt;serial port&lt;/strong&gt;. You also wish to use the &lt;strong&gt;precompiled&lt;/strong&gt; firmware.&lt;/p&gt;
&lt;p&gt;I follow your steps:&lt;/p&gt;
&lt;p&gt;1)&lt;/p&gt;
&lt;p&gt;[quote user="cecyliaw"][/quote]&lt;/p&gt;
&lt;p&gt;Generating keys:&lt;br /&gt;&lt;strong&gt;nrfutil.exe keys generate private.key&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;nrfutil keys display --key pk --format code private.key --out_file public_key.c&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Then I generate my own zip file:&lt;br /&gt;&lt;strong&gt;nrfutil pkg generate --hw-version 52 --application-version 1 --application blinky_mbr.hex --key-file private.key --sd-req 0 my_blinky_mbr.zip&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2)&lt;/p&gt;
[quote user="cecyliaw"]&lt;p&gt;&lt;/p&gt;&lt;p&gt;Install micro-ecc - done&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;3)&lt;/p&gt;
&lt;p&gt;[quote user="cecyliaw"][/quote]&lt;/p&gt;
&lt;p&gt;Compile the bootloader. -&amp;gt; Should I use &amp;quot;secure_bootloader_uart-mbr_pca10056&amp;quot;? Or &amp;quot;secure-bootloader_usb_mbr_pca10056&amp;quot; ? Debug? no Debug?&lt;br /&gt;I&amp;#39;ve decided to use: secure_bootloader_uart_mbr_pca10056 no debug. and change the public key with the ones generated from step 1.&lt;br /&gt;Build ran OK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;UART and USB are different transport layers, but this might be confusing in this case. The difference between the two bootloaders are that the &lt;strong&gt;USB&lt;/strong&gt; bootloader does not require a signature for the Application and so on, it only requires for the bootloader. The &lt;strong&gt;UART &lt;/strong&gt;bootloader on the other hand is &amp;quot;secure&amp;quot; and requires a signature for all the components (like the&amp;nbsp;&lt;strong&gt;BLE &lt;/strong&gt;bootloader).&lt;/p&gt;
&lt;p&gt;The difference between Debug/No Debug is the possibility to debug. This might be more useful if you had created all the components yourself.&lt;/p&gt;
&lt;p&gt;I also used the &lt;strong&gt;pca10056_uart&lt;/strong&gt; bootloader. (examples\dfu\secure_bootloader\pca10056_uart)&lt;/p&gt;
&lt;p&gt;4)&lt;/p&gt;
&lt;p&gt;[quote user="cecyliaw"][/quote]&lt;/p&gt;
&lt;p&gt;If you generated a bootloader settings HEX file, flash it using the following command:&lt;br /&gt;nrfjprog --program --sectorerase settings.hex&lt;/p&gt;
&lt;p&gt;I followed &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.tools%2Fdita%2Ftools%2Fnrfutil%2Fnrfutil_settings_generate_display.html"&gt;another page &lt;/a&gt;to generate a basic setting:&lt;br /&gt;&lt;strong&gt;nrfutil settings generate --family NRF52840 --application blinky_mbr.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil settings display settings.hex&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Then I merged the bootloader settings with bootloader:&lt;br /&gt;&lt;strong&gt;mergehex --merge settings.hex secure_bootloader_uart_mbr_pca10056.hex --output output.hex&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also did this.&lt;br /&gt;&lt;br /&gt;5)&lt;/p&gt;
[quote user="cecyliaw"]&lt;p&gt;&lt;/p&gt;&lt;p&gt;Program the HEX file. &lt;br /&gt;I used nrfConnect&amp;#39;s programmer and programmed the following 3 files:&lt;br /&gt;&lt;strong&gt;mbr.hex&lt;/strong&gt; - from C:\Users\cwati\Documents\My Work\Nordic\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_dfu_test_images\uart\nrf52840&lt;br /&gt;&lt;strong&gt;output.hex&lt;/strong&gt; - from step 4&lt;br /&gt;&lt;strong&gt;blinky_mbr.hex&lt;/strong&gt; - from C:\Users\cwati\Documents\My Work\Nordic\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_dfu_test_images\uart\nrf52840&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I only programmed &lt;strong&gt;mbr.hex &lt;/strong&gt;and &lt;strong&gt;output.hex,&lt;/strong&gt; there is no point in programming &lt;strong&gt;blinky_mbr.hex&lt;/strong&gt;, since this is the firmware you are trying to update your device with.&lt;/p&gt;
&lt;p&gt;6)&lt;/p&gt;
&lt;p&gt;The device did enter DFU mode&lt;/p&gt;
&lt;p&gt;7)&lt;/p&gt;
[quote user="cecyliaw"]&lt;p&gt;&lt;/p&gt;&lt;p&gt;Use either nrfutil or a mobile app to perform the DFU:&lt;br /&gt;I power cycled while holding down Button 4 so that LED stops (DFU mode) and ran:&lt;br /&gt;&lt;strong&gt;nrfutil dfu ble -ic NRF52 -f -pkg my_blinky_mbr.zip &lt;/strong&gt;and got error below.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Since you are trying to do a DFU over &lt;strong&gt;UART, &lt;/strong&gt;it would be wrong to use the command &lt;strong&gt;nrfutil dfu ble&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you look at &lt;strong&gt;step 9&lt;/strong&gt; in the link you sent, you can read this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78a1c8520c3646e194aa7e7e8751d116/pastedimage1550133374549v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So you have to use the command &lt;strong&gt;nrfutil dfu serial&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Like i did here: (note that my &lt;strong&gt;.zip file &lt;/strong&gt;is called &lt;strong&gt;jada.zip for no reason&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78a1c8520c3646e194aa7e7e8751d116/pastedimage1550133441943v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;______________________________________________________________________________________________________________________________&lt;/p&gt;
&lt;p&gt;Moving on to more of your questions:&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;1) Does this example &amp;quot;Secure DFU Bootloader over Serial Link (UART/USB)&amp;quot; expect us to use the UART or USB example? Or will either one work?&lt;br /&gt;For running either of those 2 examples, do I need to connect the USB cable on 52840 DK Board to the JLINK port, or to the nRF USB port?&lt;/p&gt;
&lt;p&gt;And, when it&amp;#39;s in DFU serial mode, do I expect to see, on the Device Manager, something other than &amp;quot;JLINK&amp;quot; on the COM PORT? Because I only see &amp;quot;JLINK&amp;quot; for now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The difference between the two is as I said in &lt;strong&gt;step 3&lt;/strong&gt; above. Either will work with the right setup. You only need to connect a USB cable to your nRF52840 DK to the &amp;quot;J-Link port&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When its in DFU mode, is this what you see?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78a1c8520c3646e194aa7e7e8751d116/pastedimage1550133692977v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]2) How many hex files do I need to program for an empty DK eval? I think I need to program:&lt;br /&gt;MBR.Hex (resides at 0x0000)&lt;br /&gt;Application (such as blinky_mbr.hex) starting from 0x1000&lt;br /&gt;output.hex, which consists of Bootloader Settings + Bootloader&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;I don&amp;#39;t quite understand this question. But I will make a statement which I hope will help.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you wish to do serial DFU, you either need to program:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1) Bootloader, bootloader settings, MBR&lt;/p&gt;
&lt;p&gt;2) Bootloader, bootloader settings, MBR, SoftDevice&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you wish to do a DFU Over the Air (OTA), you need to program:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Bootloader, bootloader settings, MBR, SoftDevice&lt;/p&gt;
&lt;p&gt;It should be noted that the MBR is a part of the SoftDevice, but you will do no harm in programming both.&lt;/p&gt;
[quote user=""]3) I use the mbr.hex from the example folder, but will we ever have the need to generate or modify mbr.hex?[/quote]
&lt;p&gt;&amp;nbsp;The &lt;strong&gt;mbr.hex&lt;/strong&gt; from this folder is what it is, the Master Boot Record, it should not be modified or generated in any way by you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this helps.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>