<?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>DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68165/dfu-buttonless-with-bond-not-working</link><description>Hello there, 
 First of all, I had searched similar issue internally but didn&amp;#39;t find any solution. 
 
 My problem is for my application with DFU buttonless without bond everything is okay. So I just followed the instruction ( https://devzone.nordicsemi</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Sep 2025 14:29:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68165/dfu-buttonless-with-bond-not-working" /><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/547676?ContentTypeID=1</link><pubDate>Wed, 03 Sep 2025 14:29:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30313c1f-b704-456e-a873-d3f0f7360b8d</guid><dc:creator>Lei</dc:creator><description>&lt;p&gt;Hi it really depends on the details. As Vidar suggested, it may be better to create a new ticket or a private case. Vidar helped me to solve the problem long time ago.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/547604?ContentTypeID=1</link><pubDate>Wed, 03 Sep 2025 10:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00fc813b-5dd7-4402-9296-afc11bfc9f05</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/qinss_5f00_jon"&gt;Qinss_jon&lt;/a&gt;&amp;nbsp;, this&amp;nbsp;case&amp;nbsp;is pretty old. Please create a new thread&amp;nbsp;with information about your setup and a description of the problem you&amp;#39;re experiencing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/547601?ContentTypeID=1</link><pubDate>Wed, 03 Sep 2025 10:01:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67250e7c-6163-4e68-b06c-9c475d5d8be9</guid><dc:creator>Qinss_jon</dc:creator><description>&lt;p&gt;What is the cause of the problem？The problems I am currently facing are the same as yours&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279343?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 16:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13597ec6-d1aa-4d58-aadd-b04036ed1026</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Lei,&lt;/p&gt;
&lt;p&gt;Yes, please do. It&amp;#39;s probably easier if I can debug it here. Just create a new private ticket. I&amp;#39;ll assign it to myself tomorrow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279341?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 16:36:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7807eb57-3e21-4171-a711-222d8de7cd65</guid><dc:creator>Lei</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can I create a private case ticket? So I can upload everything for your reference.&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;-Lei&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279328?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 15:41:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02dae30f-f152-42dd-a7df-fd4c2ccf614f</guid><dc:creator>Lei</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;The &lt;span&gt;ble_dfu_buttonless_async_svci_init&lt;/span&gt; is in service Initialization. I tried to move it right after log_init() in main() but got the same error.&lt;/p&gt;
&lt;p&gt;The current init sequence in Main() is okay for DFU without bond. It&amp;#39;s like bond changes something.&lt;/p&gt;
&lt;p&gt;I just tried to move the peer_manager_init before service_init. It seems the program passed the service_init but stuck at advertising_init(), more specifically at &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;err_code = ble_advdata_encode(&amp;amp;srdata, m_adv_data.scan_rsp_data.p_data, &amp;amp;m_adv_data.scan_rsp_data.len);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;with &amp;quot;ERROR 7, INVALID_PARAM&amp;quot;.&lt;/p&gt;
&lt;p&gt;Can I send you my source code?&lt;/p&gt;
&lt;p&gt;Here is my advertising_init() code&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;static void advertising_init(void)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret_code_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; err_code;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_advdata_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; advdata;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_advdata_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; srdata;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_gap_adv_params_t adv_params;&lt;br /&gt;//&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ble_advertising_init_t init;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_uuid_t adv_uuids[] = {{LBS_UUID_SERVICE, m_lbs.uuid_type}};&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Build and set advertising data.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memset(&amp;amp;advdata, 0, sizeof(advdata));&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; advdata.name_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = BLE_ADVDATA_FULL_NAME;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; advdata.include_appearance = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; advdata.flags&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memset(&amp;amp;srdata, 0, sizeof(srdata));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srdata.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srdata.uuids_complete.p_uuids&amp;nbsp; = adv_uuids;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err_code = ble_advdata_encode(&amp;amp;advdata, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);&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; err_code = ble_advdata_encode(&amp;amp;srdata, m_adv_data.scan_rsp_data.p_data, &amp;amp;m_adv_data.scan_rsp_data.len);&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; // Start advertising.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memset(&amp;amp;adv_params, 0, sizeof(adv_params));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adv_params.p_peer_addr&amp;nbsp;&amp;nbsp; = NULL;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adv_params.filter_policy = BLE_GAP_ADV_FP_ANY;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adv_params.interval&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = APP_ADV_INTERVAL;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adv_params.duration&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = APP_ADV_DURATION;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adv_params.primary_phy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = BLE_GAP_PHY_1MBPS;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;adv_params);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; APP_ERROR_CHECK(err_code);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279298?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 14:21:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf0cfee9-4a94-43ca-a6b8-90be787fe34b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Lei,&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t notice that you had &lt;span&gt;ble_dfu_buttonless_async_svci_init&lt;/span&gt;() in your service initialization. I took a closer look at the code now, and I think the error may be coming from ble_dfu_buttonless_init::ble_dfu_buttonless_backend_init(). It will return this error if the Peer manager is not initialized. Could this be it?&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: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279286?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 14:01:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5873d12-cad7-4112-84b6-7df432d413b2</guid><dc:creator>Lei</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Yes, all you mentioned are set. That&amp;#39;s why I feel weird.&lt;/p&gt;
&lt;p&gt;I set the &lt;span&gt;ble_dfu_buttonless_async_svci_init&lt;/span&gt; right after log_init(). From my original post, the debug info showed &lt;span&gt;ble_dfu_buttonless_async_svci_init() called and success.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;As I mentioned, everything is fine for DFU without bond. I also tried other application withDFU and Bond. It worked fine too. But just for this application after change the bond setting, the program stuck at &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;err_code = ble_dfu_buttonless_init(&amp;amp;dfus_init);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;I suspect it may be some conflict between different services. Can you please take a look at my services_init() and main() in original post?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Or I can send you my source file with everything there.&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;-Lei&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279274?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 13:47:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2692e3d-0ac9-40af-a0ed-8fdd95f310b8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Lei,&lt;/p&gt;
&lt;p&gt;Good, you also remembered the &lt;span&gt;NRF_SDH_BLE_SERVICE_CHANGED&amp;nbsp; option. Other things to check:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Is ble_dfu_buttonless_async_svci_init() called at the beginnig of main()?&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;text-indent:0;"&gt;&lt;span&gt;2. Is NRF_DFU_SVCI_ENABLED,&amp;nbsp;BL_SETTINGS_ACCESS_ONLY and &lt;/span&gt;NRF_DFU_TRANSPORT_BLE=1 included in the list of pre-processor definitions&lt;/p&gt;
&lt;p style="margin:0;text-indent:0;"&gt;&lt;/p&gt;
&lt;p style="margin:0;text-indent:0;"&gt;Best regards,&lt;/p&gt;
&lt;p style="margin:0;text-indent:0;"&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279257?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 13:21:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0791d839-e766-400f-ace9-8d9bff4e531d</guid><dc:creator>Lei</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for looking into my case. I did&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change&amp;nbsp;NRF_DFU_BLE_REQUIRES_BONDS to 1&lt;/li&gt;
&lt;li&gt;Change&amp;nbsp;NRF_SDH_BLE_SERVICE_CHANGED to 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am successfully done the DFU_buttonless example with bond. So the bootloader for bond should be okay.&lt;/p&gt;
&lt;p&gt;I am also successfully integrating DFU_buttonless into my application without bond. I just got problem when I modify the sdk_config.h to set bond to 1 also following the instruction in previous link.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In addition to these setting,&lt;/p&gt;
&lt;p&gt;In sdk_config.h in the bootloader:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change&amp;nbsp;NRF_DFU_BLE_REQUIRES_BONDS to 1&lt;/li&gt;
&lt;li&gt;Change&amp;nbsp;NRF_SDH_BLE_SERVICE_CHANGED to 1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;- In sdk_config.h in ble_app_buttonless_dfu&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change&amp;nbsp;NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 1&lt;/li&gt;
&lt;li&gt;Check if&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_SERVICE_CHANGED is not 1 then set it to 1&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;do I need to change anything else for DFU with bond?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Lei&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless with Bond not working.</title><link>https://devzone.nordicsemi.com/thread/279253?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 13:08:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67d17385-edca-46ae-93b7-833f6a5483a9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please make sure you have enabled the NRF_DFU_BLE_REQUIRES_BONDS config option for the bootloader as well. This is required to support the bond sharing mechanism between app and bootloader (&lt;span&gt;&lt;a title="Buttonless Secure DFU Service with bonds" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/service_dfu.html?cp=7_1_3_3_5_2#secure_dfu_buttonless_bonded"&gt;Buttonless Secure DFU Service with bonds&lt;/a&gt;&lt;/span&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></channel></rss>