<?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>Would like to require bonds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32573/would-like-to-require-bonds</link><description>I have a button that will put my device into pairing mode. While in this mode, I want central devices that connect to form bonds so that when not in pairing mode I have a whitelist for bonded devices. I need to use Just Works parameters as my device only</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Mar 2018 16:33:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32573/would-like-to-require-bonds" /><item><title>RE: Would like to require bonds</title><link>https://devzone.nordicsemi.com/thread/125595?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 16:33:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b68bbcd0-327f-43af-abbb-82bba166fdf2</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Make sure that bootloader and application is compiled with the same value for the NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS flag.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You should also make sure that you &lt;/span&gt;program the bootloader+app+sd+bootloader settings (needed to validate the application so that bootloader can boot app on startup). You can generate the bootloader settings page by following the instructions outlined&amp;nbsp;here:&amp;nbsp;&lt;span&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrfutil/nrfutil_settings_generate_display.html?cp=5_5_6"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrfutil/nrfutil_settings_generate_display.html?cp=5_5_6&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When compiled with&amp;nbsp;NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS flag set to &amp;#39;1&amp;#39; the bootloader will only advertise if peer data is available (i.e., bonding information). Problem is that peer data needs to be set by the application through the Supervisor call interface beforehand. In other words, you need to start DFU from the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Steps to test DFU with bonds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Program Softdevice and bootloader built with&amp;nbsp;NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS&lt;/li&gt;
&lt;li&gt;Program &amp;quot;buttonless&amp;quot; app&lt;/li&gt;
&lt;li&gt;Generate bootloader settings page:&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrfutil/nrfutil_settings_generate_display.html?cp=5_5_6"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrfutil/nrfutil_settings_generate_display.html?cp=5_5_6&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Program bootloader settings page: nrfjprog --program settings.hex --sectorerase -r&lt;/li&gt;
&lt;li&gt;Application should be advertising at this point. Now you can bond with the device and try DFU with your zip package.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Would like to require bonds</title><link>https://devzone.nordicsemi.com/thread/125437?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 03:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f631527e-826e-4aeb-b0c2-06de0c327bca</guid><dc:creator>BrianK</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the quick response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To answer your questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;BLE peripheral&lt;/li&gt;
&lt;li&gt;Central is a smartphone/tablet&lt;/li&gt;
&lt;li&gt;nRF52&lt;/li&gt;
&lt;li&gt;SD 132 v 5&lt;/li&gt;
&lt;li&gt;SDK 14.2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;Also&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;#39;m using using bootloader_secure_ble (working and tested without bonds enabled)&lt;/li&gt;
&lt;li&gt;The app is a combination of the ble_app_buttonless_dfu and ble_app_hrs examples&lt;/li&gt;
&lt;li&gt;I am calling pm_sec_params_set() with Just Works settings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is some progress since the original post, but I still have the requirement to force bonding for secure DFU.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;* I am setting NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 1 in the app&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From looking at other info in the forums I found it isn&amp;rsquo;t sufficient to set the SEC_PARAM_BOND setting to 1. There must also be device data with access permissions that have non-zero security mode and level. So setting encryption parameters for attributes with:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM( )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;causes Android to bond and causes iOS to ask to Pair or Cancel, which results in a bond if confirmed. If the user cancels, then the data is not readable, which is ok, however the DFU service is still accessible. Seems like that is expected behavior so far?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;*** However, if I set NRF_DFU_BLE_REQUIRES_BONDS to 1 in the bootloader, the app crashes when trying to access the SoftDevice when calling&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nrf_dfu_svci_vector_table_set()&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The last few lines of debug output are:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: Setting vector table to bootloader: 0x00078000&lt;/p&gt;
&lt;p&gt;&amp;lt;error&amp;gt; app: ERROR 1 [NRF_ERROR_SVC_HANDLER_MISSING] at ./ble_dfu_service.c:78&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This looks like a missing SoftDevice, but I am programming it to flash along with the BL and App.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m running out of ideas for things to try. Am I missing something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Would like to require bonds</title><link>https://devzone.nordicsemi.com/thread/125398?ContentTypeID=1</link><pubDate>Wed, 21 Mar 2018 15:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e2e025d-7528-4c70-a860-2065714a5044</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you provide some more information?&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Is your device a BLE &lt;/span&gt;peripheral&amp;nbsp;&lt;span&gt;?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Is the central a smartphone or a nRF device?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Are you using nRF51 or nRF52?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;What SDK version are you using?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Are you using a particular SDK example ?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Are you calling pm_sec_params_set() &lt;/span&gt;to set the security parameters ?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>