<?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>Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27051/secure-dfu-bootloader-application-not-starting</link><description>Hello, 
 I have a problem with secure bootloader.
what I did: 
 
 Flash SoftDevice 130 using nRFgo Studio. 
 Compiling \examples\dfu\bootloader_secure\ (i removed the error regarding the key). 
 Flashing the bootloader with Keil (using nrfjprog</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Mar 2017 12:16:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27051/secure-dfu-bootloader-application-not-starting" /><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106268?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 12:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63bba610-b389-4a27-8d70-173c01b18c25</guid><dc:creator>Duncan Hurst</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have the same problem on:&lt;/p&gt;
&lt;p&gt;pca10040
SD132
SDK v12.1.0
NRF52&lt;/p&gt;
&lt;p&gt;I have erased the dev board and programmed in the SD s132 v3.0.0 using nRFgo Studio.
I built the bootloader_secure example (non-debug version in Keil 5 although I saw the same &amp;quot;error regarding the key&amp;quot; as above but defined NRF_DFU_DEBUG_VERSION in the project options to get the Public Key included)) and flashed it in (I tried nrfjprog and nRFgo Studio).
The dev board does not advertise at the end of this sequence. LED 1 is not lit.&lt;/p&gt;
&lt;p&gt;I have also tried building the debug version of the example using IAR but with the same result.&lt;/p&gt;
&lt;p&gt;If I flash in the pre-built hex file examples\dfu\bootloader_secure\pca10040_debug\hex\secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex then it advertises as DfuTarg as expected.&lt;/p&gt;
&lt;p&gt;Why does it not advertise when I follow the instructions and build the example from source?&lt;/p&gt;
&lt;p&gt;Thanks,
Duncan Hurst&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106281?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 23:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d0c4ba2-a18d-4676-bb08-3c86b220684e</guid><dc:creator>daniel77</dc:creator><description>&lt;p&gt;This is the further guide on IOS nRF Connect and nRF Toolbox to get the buttonless DFU triggered from the app. I got the buttonless DFU working finally.&lt;/p&gt;
&lt;p&gt;Thanks Hong Bui!  Yes, my phone was cached on previous service and only able to see the DFU service after turning on &amp;amp; off the Bluetooth.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Connect with the device &amp;quot;Nordice_Template&amp;quot; via IOS nRF Connect and discover the &amp;quot;Unknown Service&amp;quot;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/IMG_5F00_4971.PNG" alt="Unknown Service" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Click on the service to discover the &amp;quot;Unknown Characteristics&amp;quot;. Click on the right button (3 parallel arrows down button) to enable the service.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/IMG_5F00_4972.PNG" alt="Unknown Char" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The button will turn into a cross out arrow down as below.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/IMG_5F00_4973-1.PNG" alt="Enabled Char Service" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Click arrow up button to write 0x01 to the characteristics&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8204.IMG_5F00_4969.PNG" alt="Service enabled" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The value will change to 0x200101. The device will be disconnected and the nRF51 DK will light up the LED 3.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/IMG_5F00_4974.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Find the device advertised as &amp;quot;DfuTarg&amp;quot; in nRF Toolbox and select it as DFU target.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/IMG_5F00_4975.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Upload the buttonless DFU app .zip file.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/IMG_5F00_4976.PNG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106278?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 10:54:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b6a50a5-f4d2-4acd-87b6-2f0f365ece6f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@mr91: You would need to add the write property to the characteristic. It&amp;#39;s a bug in the buttonless example. Please see &lt;a href="https://devzone.nordicsemi.com/question/93414/sdk12-ble_app_buttonless_dfu/?answer=95079#post-id-95079"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106280?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 10:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ef65bcd-97ab-4feb-b668-09fcd0b07550</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;I got it working now. There was a problem with my hardware abstraction, so there was always a dfu request. the application starts now. However, when I flash the buttonless example (SDK 12.2.0), there is a &amp;quot;Experimental Buttonless DFU Service&amp;quot; with a characteristic &amp;quot;Experimental Buttonless DFU&amp;quot;. But there is no control point I can write to to start the bootloader. This control point does not appear when I use &amp;quot;enable services&amp;quot;. Whats wrong now? I am so close to my goal :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106279?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 10:20:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9cd5dba-cb63-44ff-af1a-d379582ec537</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@daniel: Please make sure you refresh Bluetooth (turn off and on) on the phone and remove pairing if any. As you can find in the source code of the example there is no HRM service declared. Are you using SDK v12 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106276?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 09:26:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04dfdd1d-4c41-4a77-abd1-c14040f3fc7d</guid><dc:creator>daniel77</dc:creator><description>&lt;p&gt;Hi Hung Bui, I have read that many times. I am using IOS nRF Connect instead of Master Control Panel stated there. I cannot see &amp;quot;Nordic_Buttonless&amp;quot;, but only &amp;quot;Nordic_Template&amp;quot;. I don&amp;#39;t see DFU Service, except battery service, device info, HRM service. There is not Control Point that I can write to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106275?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 08:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c9e167b-f636-4664-aeb6-f2e8055980ea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi daniel,&lt;/p&gt;
&lt;p&gt;Thanks for verifying the process from Mr91.&lt;/p&gt;
&lt;p&gt;Regarding your question, you can have a look at this example \examples\ble_peripheral\experimental_ble_app_buttonless_dfu to know how to switch to bootloader. The documentation is &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/ble_sdk_app_buttonless_dfu.html?cp=4_0_1_4_2_2_22"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that it&amp;#39;s experimental and we may change that in the furture. But it&amp;#39;s simply a demonstration on how to switch to bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106277?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2016 21:53:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51f3b81b-f82f-40eb-85fa-ae946f843e4d</guid><dc:creator>daniel77</dc:creator><description>&lt;p&gt;I followed mr91&amp;#39;s steps above and was able to boot into &amp;quot;Nordic_Template&amp;quot; advertised in IOS nRF Connect. I was using nRF51 DK PCA10028 SDK 12.2 secure bootloader and experimental buttonless DFU. However, I am not able to find the DFU Service within &amp;quot;Nordic_Template&amp;quot; services. I wanted to perform a buttonless OTA DFU via the app by using nRF Toolbox again. How to make it happen?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106273?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2016 11:32:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03db0e18-92eb-4278-a59e-934abd5c879f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mr91,&lt;/p&gt;
&lt;p&gt;All your steps looked fine. I need to see the log when you do DFU. You can find the log by openning nRFLogger.&lt;/p&gt;
&lt;p&gt;Also if you have  a sniffer trace it would be useful.&lt;/p&gt;
&lt;p&gt;You can also turn off optimization in the project option, re-flash the bootloader and enter debug mode, then you can step into the code of the bootloader and check why the application is not started after you do DFU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106274?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2016 11:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92efe4d8-1fc5-4dc0-a18f-eed993b2a2ca</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thanks for your reply. In fact it would be great to use DFU to transfer even the first appliation.
This is what I did:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1. Erase device
2. Program SD130 using nRFgo Studio
3. Compile the bootloader with my own keyfile (created out of priv.pem)
4. Flashing the bootloader (device is then advertising as &amp;quot;DfuTarg&amp;quot;
5. Compiling my application
6. Copying the generated Hexfile (app.hex) to the nrfutil folder
7. Running nrfutil with: 
nrfutil.exe pkg generate --application app.hex --key-file priv.pem --hw-version 51 --sd-req 0x67,0x80,0x87 --application-version 0x02 output.zip
8. Transfering output.zip to my mobile phone
9. Connecting to &amp;quot;DfuTarg&amp;quot; in nRF Connect app
10. Choosing &amp;quot;DFU&amp;quot; in the upper right corner
11. Choosing the file &amp;quot;output.zip&amp;quot;
12. Progress is displayed as graph
13. After &amp;quot;Disconnecting&amp;quot; is shown in the app, the device is still advertising as &amp;quot;DfuTarg&amp;quot;, not running my application
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Can you tell me whats wrong?&lt;/p&gt;
&lt;p&gt;Edit: Also tried it with nRF Toolbox, same result (progress is completed, still advertising as DfuTarg).
Also tried to create a bootloader settings file and merged it with the application, then same process with nrfutil as above. In that case, the bootloader does not accept the file in the first place (no progress is shown in apps, immediate disconnecting after connection is established).&lt;/p&gt;
&lt;p&gt;Edit: I performed all above steps with SDK V12.2 (since bootloader was not advertising in 12.1)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106272?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2016 08:32:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe27f4b4-3abd-4812-8df0-70161ddc8537</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The bootloader was made so that you would need to program the application via DFU bootloader to make it start.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t want to use the DFU bootloader to upload your first application, and prefer to use the programmer instead, you need to alter the bootloader setting in flash to tell the bootloader to start the application. You can generate a bootloader setting hex file then write it to flash to do that. Please have a look &lt;a href="https://devzone.nordicsemi.com/question/101170/bootloader-sdk12-wont-start-application/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106271?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 15:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33502f4b-cc90-46ec-8e91-92c511e6fea5</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thank you. If i flash the application with Keil (using Segger J-Link) after flashing the bootloader, should the bootloader start this application? Atm it does not leave the bootloader mode (assuming no valid application is found at app start address). Do I have to adapt addresses in the application to get it recognized correctly by the bootloader? Or is it necessary to use the BLE DFU update to get the application running? Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106270?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 12:46:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a0d120e-de7b-4f9a-bb69-7d4daf2cc07f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I don&amp;#39;t think there was any major modification between SDK v12.2 and SDK v12.0 on the DFU bootloader. Maybe if you test again with a fresh install of SDK v12.0 it may work.&lt;/p&gt;
&lt;p&gt;The difference between the debug version and the normal version is that the debug version won&amp;#39;t check for version check (application version, bootloader version, hardware version etc). So if use the normal version, please make sure you set the version correctly (update version should not be lower than original version).&lt;/p&gt;
&lt;p&gt;To get nRFutil on Windows, you need to install python, install pip and then do &amp;quot;pip install nrfutil&amp;quot; please follow the instruction &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106269?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 09:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a490c577-1556-474e-9b22-3c27e850388f</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Hello and thanks for your response. Since I do not know the exact differences between the debug version and the normal one of the secure bootloader, I used the non-debug-version. To get a successful compilation, I changed the dfu_public_key.c to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//#ifdef NRF_DFU_DEBUG_VERSION 

/** @brief Public key used to verify DFU images */
__ALIGN(4) const uint8_t pk[64] =
{
    0x6e, 0x76, 0x24, 0x50, 0x38, 0xb6, 0xed, 0x60, 0xc3, 0x60, 0x12, 0x50, 0x00, 0xd2, 0x25, 0x0f, 0xee, 0x37, 0xbf, 0x00, 0x02, 0x6b, 0x50, 0x92, 0x80, 0x32, 0x42, 0x2e, 0xd6, 0x68, 0xde, 0xdf, 
    0x3b, 0xcf, 0xa4, 0x6a, 0x3e, 0x45, 0x9b, 0xb3, 0xb1, 0x3c, 0xa3, 0x39, 0xcc, 0x95, 0x58, 0x36, 0xcd, 0x6d, 0x7e, 0x1f, 0xa1, 0xab, 0x79, 0x05, 0x35, 0x2d, 0x2a, 0xda, 0x19, 0xdb, 0x88, 0xce
};

//#else
//#error &amp;quot;Debug public key not valid for production. Please see &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/README.md"&gt;github.com/.../README.md&lt;/a&gt; to generate it&amp;quot;
//#endif
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Could this be the reason for the bootloader not to start?
I use SDK v12.1.0 on nRF51. I find it hard to debug software which interacts with a SoftDevice since it generates a Hard Fault after hitting the breakpoint.&lt;/p&gt;
&lt;p&gt;Thank you very much for your support!&lt;/p&gt;
&lt;p&gt;Edit: It&amp;#39;s not possible to compile the bootloader with -O0 since the image gets too big. Unfortunately it&amp;#39;s also not possible to enable the debug messages (NRF_LOG_INFO).&lt;/p&gt;
&lt;p&gt;Edit2: I am not sure if it&amp;#39;s of any help since optimization is still active, but in nrf_dfu_transports_init() there is a call&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ret_val = trans-&amp;gt;init_func();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Regarding to the debugger, this is a zero-pointer (NULL).&lt;/p&gt;
&lt;p&gt;Edit3: Tried it with SDK V12.2.0 and it seems to work. Is there a precompiled version of nrfutil available for Windows which supports the pkg command?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU bootloader: application not starting</title><link>https://devzone.nordicsemi.com/thread/106267?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 09:57:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b31fedc-4fde-4f27-a48c-dce937c62ea4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please provide more information how you &amp;quot;removed the error regarding the key&amp;quot;.&lt;/p&gt;
&lt;p&gt;Which SDK version are you testing with ?&lt;/p&gt;
&lt;p&gt;You can try to set the optimization level to 0 and step into the code and check why it doesn&amp;#39;t advertise.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>