<?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-Peripheral doesn&amp;#39;t respond to Bonding Request</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38125/ble-peripheral-doesn-t-respond-to-bonding-request</link><description>I&amp;#39;m evaluating possibilities of BLE-LESC Pairing/Bonding with the ble_app_hrs peripheral on the nRF52840-DK with SDK 12.3 and SoftDevice s132. To see what&amp;#39;s going on in the background I used the nRF BLE sniffer (on a nRF52840-PDK). 
 The parameters I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Sep 2018 14:25:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38125/ble-peripheral-doesn-t-respond-to-bonding-request" /><item><title>RE: BLE-Peripheral doesn't respond to Bonding Request</title><link>https://devzone.nordicsemi.com/thread/147414?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 14:25:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c84f059e-c347-4d0e-9d28-37d506ebe44e</guid><dc:creator>dCSeven</dc:creator><description>&lt;p&gt;Thank you, this solved my problem.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But how did you track the error code down?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE-Peripheral doesn't respond to Bonding Request</title><link>https://devzone.nordicsemi.com/thread/147360?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 11:58:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61da5ce5-1eb8-49e3-84d9-9fc474659247</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I was able to reproduce this on my side as well. The issue seems to be that the Peer manager only allocates memory for holding keys when doing bonding, not pairing. You can see this by tracking the error code further: The&amp;nbsp;NRF_ERROR_INVALID_ADDR is returned from the call to&amp;nbsp;sd_ble_gap_sec_params_reply() on line 640 in security_dispatcher.c, which is caused by all pointers in sec_keyset.keys_own and sec_keyset.keys_peer being&amp;nbsp;NULL.&amp;nbsp;The following modifications seems to fix the issue (I have not tested thoroughly, though):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/components/ble/peer_manager/security_dispatcher.c b/components/ble/peer_manager/security_dispatcher.c
index e115367..26b52de 100644
--- a/components/ble/peer_manager/security_dispatcher.c
+++ b/components/ble/peer_manager/security_dispatcher.c
@@ -574,7 +574,7 @@ ret_code_t smd_params_reply(uint16_t                 conn_handle,
         // NULL params means reject pairing.
         sec_status = BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP;
     }
-    else if (p_sec_params-&amp;gt;bond)
+    else
     {
         // Bonding is to be performed, prepare to receive bonding data.
         pm_peer_data_t       peer_data;
@@ -622,10 +622,6 @@ ret_code_t smd_params_reply(uint16_t                 conn_handle,
             }
         }
     }
-    else
-    {
-        // Pairing only, no action needed.
-    }
 
     if (err_code == NRF_SUCCESS)
     {
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As a side note I suggest that you move to SDK 15 (or later), as that is the first SDK with full support for nRF52840.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE-Peripheral doesn't respond to Bonding Request</title><link>https://devzone.nordicsemi.com/thread/147227?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 15:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cab39a36-cebd-4f33-b0b3-6ee9c2be214b</guid><dc:creator>dCSeven</dc:creator><description>&lt;p&gt;I tried the nRF Connect for Desktop (previously only used the mobile one), but the Desktop one is much cooler and has more features.&lt;br /&gt;&lt;br /&gt;When trying around with the program and after setting up logging on the peripheral, I noticed, that a fatal error is thrown on the peripheral when no bonding is configured and I pair using LESC (without lesc everything works fine).&lt;br /&gt;This error occurs in pm_evt_handler: PM_EVT_ERROR_UNEXPECTED with error code 0x10 (which is NRF_ERROR_INVALID_ADDR if I look it up correctly).&lt;br /&gt;When setting the bond flag, this doesn&amp;#39;t happen.&lt;br /&gt;&lt;br /&gt;Here is a sniffer trace with Bonding enabled on the peripheral connecting to my phone. Without bonding the peripheral doesn&amp;#39;t respond after the Bonding Request (probably caused by the error mentioned above).&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/HRM_5F00_LESC_5F00_Bonding_5F00_central_5F00_initiated.pcapng"&gt;devzone.nordicsemi.com/.../HRM_5F00_LESC_5F00_Bonding_5F00_central_5F00_initiated.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated the repository to output the error position on a FATAL error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE-Peripheral doesn't respond to Bonding Request</title><link>https://devzone.nordicsemi.com/thread/147129?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 09:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f8e28e6-e8dd-4df0-8827-011c0575c9bc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not have access to an Android device at the moment, so I have not been able to test, but it seems to me that the Bluetooth API in Android does not provide a way to pair without bonding. If that is the case, then it is expected that pairing fails when the nRF is configured to pair only and the Android device is configured to bond. We could verify this if you have a sniffer trace? The logs from the mobile side and nRF side&amp;nbsp;might also show this. You can also attempt to only pair with the nRF Device using &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Connect-for-Desktop"&gt;nRF Connect for Desktop&lt;/a&gt;, which allows you so select to only pair. That would essentially prove that pairing works with the nRF, and that the issue is with the mobile device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>