<?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>Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35980/buttonless-ota-dfu-stops-after-switching-to-bootloader</link><description>Hi, 
 I&amp;#39;m evaluating the nRF5_SDK_v15.0.0 buttonless example OTA DFU bootloaders on a nRF52840-PDK. 
 The buttonless examples are working well. So I integrated the buttonless service into my own application. 
 The change from my appliction to the bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Nov 2019 09:18:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35980/buttonless-ota-dfu-stops-after-switching-to-bootloader" /><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/222262?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 09:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:566cd743-80b7-49c1-a962-f7e779c202c4</guid><dc:creator>Archana Fugare</dc:creator><description>&lt;p&gt;Not resolved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/208280?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 14:56:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3359b79-9ad2-48e9-9b59-65ea2e1d1659</guid><dc:creator>Geek</dc:creator><description>&lt;p&gt;Hello Archana,&lt;/p&gt;
&lt;p&gt;Im facing the same issue. My Application won&amp;#39;t give control to my Bootloader DFU after firmware download.&lt;/p&gt;
&lt;p&gt;Im using The exemple inside the SDK11 and&amp;nbsp; Red Bear Nano V2 Board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you resolve this issue ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/191227?ContentTypeID=1</link><pubDate>Thu, 06 Jun 2019 06:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3442275b-fa01-4994-85d1-5028ab73b618</guid><dc:creator>Archana Fugare</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please help me in this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How to switch from application mode to bootloader mode again in OTA.&lt;/p&gt;
&lt;p&gt;I am using nRF52832 DK as well as my custom board based on nRF52832.&lt;/p&gt;
&lt;p&gt;I have implemented the OTA-DFU and uploaded the application zip.&lt;/p&gt;
&lt;p&gt;Now I want to upload new application hex&amp;#39;z zip but unable to switch from application mode to bootloader mode again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Archana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/144953?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 13:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6bdf23c-fd7d-479c-8dbe-361f53353cd3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Roland,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try to modify the gap_params_init() function in nrf_dfu_ble.c in the bootloader project:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint32_t gap_params_init(void)
{
    uint32_t                err_code;
    ble_gap_conn_sec_mode_t sec_mode;
    uint8_t const *         device_name;
    uint32_t                name_len;

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;sec_mode);

#if (!NRF_DFU_BLE_REQUIRES_BONDS)

    err_code = gap_address_change();
    VERIFY_SUCCESS(err_code);

    if ((m_flags &amp;amp; DFU_BLE_FLAG_USE_ADV_NAME) != 0)
    {
        NRF_LOG_DEBUG(&amp;quot;Setting adv name: %s, length: %d&amp;quot;, m_adv_name.name, m_adv_name.len);
        device_name = m_adv_name.name;
        name_len    = m_adv_name.len;
    }
    else
    
#endif
    {
        // Change address here:
        ble_gap_addr_t my_addr;
        err_code = sd_ble_gap_addr_get(&amp;amp;my_addr);
        APP_ERROR_CHECK(err_code);
        
        my_addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
        my_addr.addr[0] = 0x00;
        my_addr.addr[1] = 0x00;
        my_addr.addr[2] = 0x00;
        my_addr.addr[3] = 0x00;
        my_addr.addr[4] = 0x00;
        my_addr.addr[5] = 0x00;
        
        err_code = sd_ble_gap_addr_set(&amp;amp;my_addr);
        VERIFY_SUCCESS(err_code);
        
        NRF_LOG_DEBUG(&amp;quot;Using default advertising name&amp;quot;);
        device_name = (uint8_t const *)(NRF_DFU_BLE_ADV_NAME);
        name_len    = strlen(NRF_DFU_BLE_ADV_NAME);
    }

    err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode, device_name, name_len);
    VERIFY_SUCCESS(err_code);

    err_code = sd_ble_gap_ppcp_set(&amp;amp;m_gap_conn_params);
    return err_code;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/144886?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 09:10:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d56cb3d-2216-401a-9796-2b24de8a489f</guid><dc:creator>roland.schenk</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;Yes, the address i used, was didfferent form the standard address, and the bootloader was advertising as &amp;quot;DfuTarg&amp;quot; on the standard device address from FICR-&amp;gt;DEVICEADDR[0] and FICR-&amp;gt;DEVICEADDR[1].&lt;/p&gt;
&lt;p&gt;An other problem was, that I had set m_bt_addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;.&lt;/p&gt;
&lt;p&gt;Now it&amp;#39;s working fine, but i had to change the address to the standard address and the address type to BLE_GAP_ADDR_TYPE_RANDOM_STATIC (like in the nordic buttonless example).&lt;/p&gt;
&lt;p&gt;Which changes are needed in the bootloder to use a custom address with address type BLE_GAP_ADDR_TYPE_PUBLIC?&lt;/p&gt;
&lt;p&gt;Thanks a lot for your help!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Roland&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/144852?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 07:43:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd45289a-79ad-4010-a9da-778cb2208925</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Roland,&lt;/p&gt;
&lt;p&gt;So I assume that you call BLC_vSetBtAddress with a custom value for u32SerialNumber, not equal to the device address already defined in the FICR, is that correct?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you do the same operation in the bootloader project?&lt;/p&gt;
&lt;p&gt;I suspect that when the device starts up in bootloader mode, the device uses the standard address found in FICR-&amp;gt;DEVICEADDR[0] and FICR-&amp;gt;DEVICEADDR[1], and hence, the PC is looking for a bootloader with a different address.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you check this by opening nRF Connect (for desktop), and start scanning after you try to perform the DFU. See if there is a device advertising with &amp;quot;DfuTarg&amp;quot; (or any other name if you changed it in the bootloader project), and see if the address corresponds with the address that you set, EC:2A:F0:F0:F0:DB, or another address?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/144835?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 06:47:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d343ee36-4842-436e-aa15-5dd3949ad15e</guid><dc:creator>roland.schenk</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In the bootloader &amp;nbsp;NRF_DFU_BLE_REQUIRES_BONDS and NRF_SDH_BLE_SERVICE_CHANGED are&amp;nbsp; set to 1.&lt;/p&gt;
&lt;p&gt;The device address is set once at he startup of the application:&lt;/p&gt;
&lt;p&gt;void BLC_vSetBtAddress(uint32_t u32SerialNumber)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ble_gap_addr_t m_bt_addr = BT_BASE_ADDRESS;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;m_bt_addr.addr_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = BLE_GAP_ADDR_TYPE_PUBLIC;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;m_bt_addr.addr[0] = u32SerialNumber &amp;amp; 0xFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;m_bt_addr.addr[1] = (u32SerialNumber &amp;gt;&amp;gt; 8) &amp;amp; 0xFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ret_code_t err_code = sd_ble_gap_addr_set(&amp;amp;m_bt_addr);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;APP_ERROR_CHECK(err_code);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NRF_LOG_INFO(&amp;quot;BT Address: %02x:%02x:%02x:%02x:%02x:%02x&amp;quot;, m_bt_addr.addr[5],m_bt_addr.addr[4], m_bt_addr.addr[3], m_bt_addr.addr[2],m_bt_addr.addr[1], m_bt_addr.addr[0]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: BT Address: EC:2A:F0:F0:F0:DB&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Roland&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/144630?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 07:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:115a3881-9cb0-4549-84d5-563817f28d78</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Do you do anything special with the device address? Have you changed it in the buttonless application?&lt;/p&gt;
&lt;p&gt;Have you changed the define in sdk_config.h in the bootloader project, called:&amp;nbsp;NRF_DFU_BLE_REQUIRES_BONDS to 1?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/144565?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 13:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efa9fab2-e0c4-45c6-a5d6-af66834ec1e6</guid><dc:creator>roland.schenk</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have integrated the peer manager in my application and now I am using the buttonless DFU service with bonding.&lt;/p&gt;
&lt;p&gt;I use PC nRF Connect to upload the firmware. The pairing / bonding is working fine. But after switching to the bootloader the connection stops and the bootloader rises a timeout error after some seconds. Then the bootloader is advertising as DfuTarg.&lt;/p&gt;
&lt;p&gt;I have added a logfile from nRF Connect and a logfile from the J-Link RTT connected to the targed running the application.&lt;/p&gt;
&lt;p&gt;What could be the reason of braeking the connection, after changeing from the application to the bootloader?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrfconnect_5F00_log_5F00_my_5F00_app.txt"&gt;devzone.nordicsemi.com/.../nrfconnect_5F00_log_5F00_my_5F00_app.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/rtt_5F00_log_5F00_my_5F00_app.txt"&gt;devzone.nordicsemi.com/.../rtt_5F00_log_5F00_my_5F00_app.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless OTA DFU stops after switching to bootloader</title><link>https://devzone.nordicsemi.com/thread/138700?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 08:44:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:001c3717-b35d-4a6f-b615-4a3291cbb02c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You may be aware of this, but the application should reset after entering bootloader mode, and start advertising as DfuTarg, so there will be a disconnect and a reconnect, but that is also the case for the buttonless example, so there is no reason it shouldn&amp;#39;t work in your application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you use nRF Connect to upload your firmware? Do you get any information from the log there? What happens after the disconnect? Does it return to application, or does it stay in bootloader mode?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>