<?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>BLE DFU Issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60992/ble-dfu-issue</link><description>Hi, 
 I am trying to develop the DFU capability for my device. 
 I added the necessary code from the example ble_app_buttonless_dfu to my application. 
 then started as explained in this step by step guide: 
 https://devzone.nordicsemi.com/nordic/short</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 May 2020 13:40:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60992/ble-dfu-issue" /><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248741?ContentTypeID=1</link><pubDate>Thu, 07 May 2020 13:40:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8f40608-483c-4947-a17b-c7c43cca8cfe</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
&lt;p&gt;I am glad to hear you got it working. Thanks for letting us know.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248523?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 14:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42925ccb-ff97-4e75-a298-45fac144bae9</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;when I was testing the third point you noted above the nrf connect app wasn&amp;#39;t able to connect anymore to the nRF52840 device anymore.&lt;/p&gt;
&lt;p&gt;I did a communication reset for the phone and suddenly everything works fine !!!&lt;/p&gt;
&lt;p&gt;I spent the whole day on this and the solution is a communication reset for the phone &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;so basically my problem was to increase the&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_VS_UUID_COUNT&amp;nbsp;and to set the RAM start address correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much for your help&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;JK&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248506?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 14:01:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69565931-13f4-488a-9d05-688ea4d88400</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
[quote user="jawadk"]How can we found what is the problem to solve it ?[/quote]
&lt;p&gt;You need to understand what error occurs in the application. I suggest we start by summing up what we know after the tests you have done so far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The application&amp;nbsp;works and runs correctly when you don&amp;#39;t have a bootloader and don&amp;#39;t initialize the buttonless DFU service by calling&amp;nbsp;ble_dfu_buttonless_async_svci_init() (this function will return an error if a bootloader is not present).&lt;/li&gt;
&lt;li&gt;DFU works, and the bootloader starts the application.&lt;/li&gt;
&lt;li&gt;When the application is started by the bootloader and you don&amp;#39;t call&amp;nbsp;ble_dfu_buttonless_async_svci_init() everything works correctly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is the above a correct understanding?&lt;/p&gt;
&lt;p&gt;If yes, then you need to debug the application when the bootloader is present after adding the call to&amp;nbsp;ble_dfu_buttonless_async_svci_init(). The simplest way to get started is to enable debug logging in the application. Is an error printed? If so, and you are using a debug build, you should see the file name, line number, and error code, which corresponds to a function call. Do you see that? Please past the log here. (Just to be clear, now we are talking about the log form the application, we are no longer interested in the bootloader since we know that is working.)&lt;/p&gt;
&lt;p&gt;To be clear: the key question now is what exactly is it that fails in the application and how? You need to find that through logging or debugging.&lt;/p&gt;
&lt;p&gt;Regarding the question about&amp;nbsp;nrf_ble_qwr_conn_handle_assign(), then yes, you should do that if you are using the Queued write module (which most SDK examples do). If not, then you should not add it.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248413?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 10:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5a8edb7-dcf3-4ffd-8e29-8e0948c53e61</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I am very stressed to solve this issue and I am running out of time&amp;nbsp;&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;the function&amp;nbsp;&lt;span&gt;ble_dfu_buttonless_async_svci_init returns an error only when there s no bootloader flashed to the device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;after I am DFUs the device I finally can debug the application FW, and I don&amp;#39;t have any errors, so I don&amp;#39;t know where the problem this !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can we found what is the problem to solve it ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;finally some question I don&amp;#39;t know if it is relevant:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;do I have to add the following code&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;            err_code = nrf_ble_qwr_conn_handle_assign(&amp;amp;m_qwr, m_conn_handle);
            APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;under the&amp;nbsp;BLE_GAP_EVT_CONNECTED case in the&amp;nbsp;ble_evt_handler function ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;JK&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248405?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 10:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2674474e-08d5-468d-87d7-6fdb9c52a757</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
&lt;p&gt;It ooks like you are close to solving the issue.&amp;nbsp;Is the error still coming from the call to&amp;nbsp;ble_dfu_buttonless_async_svci_init()? If yes, what is the error code? If this is not it, which function call returns an error, and what is the error?&amp;nbsp;This is essential information that narrowed down the issue a lot.&lt;/p&gt;
&lt;p&gt;It could potentially be that adding the call to&amp;nbsp;ble_dfu_buttonless_async_svci_init() would make a subsequent function call fail (for instance when you had&amp;nbsp;NRF_SDH_BLE_VS_UUID_COUNT&amp;nbsp; and if NUS is initialized after the buttonless DFU service. In that case, initializing NUS would fail.)&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248396?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 10:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10e3c4f7-3ddc-4f28-8089-3dbda71a258b</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Now I managed to perform the DFU correctly.&lt;/p&gt;
&lt;p&gt;The remaining problem now is the buttonless DFU part at the application.&lt;/p&gt;
&lt;p&gt;when I initialize thw DFU service I can&amp;#39;t use the NUS service !&lt;/p&gt;
&lt;p&gt;I increased the&amp;nbsp;NRF_SDH_BLE_VS_UUID_COUNT from 1 to 2&lt;/p&gt;
&lt;p&gt;And have the ble_uuid updated to:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_uuid_t m_adv_uuids[]          =                                          /**&amp;lt; Universally unique service identifier. */
{
    {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE},
    {BLE_UUID_NUS_SERVICE, NUS_SERVICE_UUID_TYPE}
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also updates the RAM-Start address to give the softdevice the memory size needed !&lt;/p&gt;
&lt;p&gt;But still I have a Problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248336?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 06:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31ca958a-416b-4578-978c-1dd0358e7c04</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;just tried to DFU the my nominal application without the &lt;span&gt;ble_app_buttonless_dfu example code I added to the application and it works, my application start working.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;No I need your help to solve this please.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;when I run the application with the&amp;nbsp;ble_app_buttonless_dfu code without the bootloader the&amp;nbsp;ble_dfu_buttonless_async_svci_init function return an error, but I think it should be doesn&amp;#39;t it ? cause their is no bootloader&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;JK&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248334?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 06:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8fbd819-5607-4c7a-818a-e1d2e0e62ae6</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;you were right.&lt;/p&gt;
&lt;p&gt;my application starts and !!&lt;/p&gt;
&lt;p&gt;but when I flash just the softdevice + application it works fine.&lt;/p&gt;
&lt;p&gt;what can be the problem ? because I tried to DFU the&amp;nbsp;ble_app_buttonless_dfu example and its also didn&amp;#39;t start advertising&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248280?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 15:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1d4f3ec-48b5-4494-8c57-c5f9bbd567be</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I an using the latest SDK with softdevice 7.0.1&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think the problem is in my application, cause it worked fine with the softdevice.&lt;/p&gt;
&lt;p&gt;besides I tried the ble_app_buttonless_dfu example instead of my application, and I faced the same problem.&lt;/p&gt;
&lt;p&gt;besides I will try to print something at the beginning of my application and will inform you when I have the result.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248260?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 15:03:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0162497d-0266-4295-956a-249a39d784f1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
[quote user="jawadk"]But after that when I flash the bootloader and read the memory again by the nRF Connect Programmer the region name of the sofdevice switched to Application ( the color switches from blue to green) and the start address of the softdevice switches to be 0xFF8 instead of 0x1000.[/quote]
&lt;p&gt;You should not put much emphasis in the addresses ranges from nRF Connect programmer when it reads the memory of a device and attempts to interpret it. This is just an issue with nRF Connect Programmer app. The last two words of the MBR page 0xFF8-0xFFF are used by the bootloader and written to either when you program the bootloader hex or by the MBR itself (depending on SDK version etc). Since they are not empty (not all FFFF&amp;#39;s, the programmer app interprets it as the start of the application, but that is not the case. I do not think this is related to the issue you are seeing.&lt;/p&gt;
[quote user="jawadk"]So I think this way when the bootloader jumps to the address 0x1000 the softdevice will not be able to run properly !&amp;nbsp;[/quote]
&lt;p&gt;No, that is not the problem.&lt;/p&gt;
[quote user="jawadk"]What can cause this problem !??[/quote]
&lt;p&gt;Good question. Can you try to &lt;strong&gt;&lt;em&gt;verify&lt;/em&gt; &lt;/strong&gt;that the application is not started? My assumption is that the application is started, but misbehaving for some reason, perhaps because the bootloader did not clean up properly after itself. Checking what happens in the application (or verifying that it does not start) should be the next step. I also wonder what SDK version you are using?&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248135?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 10:27:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c111e1ba-3622-48fe-8c29-54cc2743ea32</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;And thank you for your help.&lt;/p&gt;
&lt;p&gt;I figured something using the nRF Connect Programmer.&lt;/p&gt;
&lt;p&gt;when I flash the soft device alone and rea the memory every thing seems right.&lt;/p&gt;
&lt;p&gt;But after that when I flash the bootloader and read the memory again by the nRF Connect Programmer the region name of the sofdevice switched to Application ( the color switches from blue to green) and the start address of the softdevice switches to be 0xFF8 instead of 0x1000.&lt;/p&gt;
&lt;p&gt;So I think this way when the bootloader jumps to the address 0x1000 the softdevice will not be able to run properly !&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What can cause this problem !??&lt;/p&gt;
&lt;p&gt;here is a screen shot for the problem using nRF Connect Programmer.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/softdevice_2B00_bootloader-issue.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Thank you again for your help&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248114?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 09:38:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:138bdb6f-7e2b-4aef-a3f6-c88a60b320f9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have an immediate suggestion about what causes this issue, but I have some suggestions about how to narrow down the problem:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Which address does&amp;nbsp;app_start() jump to? 0x1000? If so, that would be correct and should cause the application to be started (by the SoftDevice in this case).&lt;/li&gt;
&lt;li&gt;Can you try verifying if the application is started or not? It could be that for some reason the presence of the bootloader causes the application to hit an error, and therefore it does not start to advertise.&amp;nbsp;Can you try putting a breakpoint in the start of main in the application? If that causes problems, can you try&amp;nbsp;toggling a GPIO a few times at the start of main, and check with a logic analyzer if that happens.&lt;/li&gt;
&lt;li&gt;You could also add RTT logging to the bootloader to see what is going on, but based on what you have written it seems likely that the application is likely started and that we need to look there to understand what is happening.&lt;/li&gt;
&lt;li&gt;Which SDK version do you use?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/248071?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 07:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c853477-44c0-49c9-a916-43aeb26ed32e</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I just debugged the boot loader after performing a successful DFU.&lt;/p&gt;
&lt;p&gt;the last function running after the bootloader lose control is the&amp;nbsp;app_start(uint32_t vector_table_addr) function from nrf_bootloader_app_start_final.c file.&lt;/p&gt;
&lt;p&gt;after the jump_to_addr function, the bootloader stop running but the application didn&amp;#39;t start at all, and can&amp;#39;t see the device advertise as it does without the bootloader.&lt;/p&gt;
&lt;p&gt;Help please.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU Issue</title><link>https://devzone.nordicsemi.com/thread/247883?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 13:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9410ffb7-a6ac-450c-acd4-d84e11d87a40</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;tried to DFU the example ble_app_buttonless_dfu with no success.&lt;/p&gt;
&lt;p&gt;flashed the softdevice, then the bootloader, then DFU using the nrf connect app on mobile, the application DFUs successfully but the bootloader not activating the application.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>