<?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>How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8239/how-to-disable-the-bond-and-pair</link><description>Hi:
Recently, I use the SDK --- &amp;quot;nRF51_SDK_8.1.0&amp;quot;, the project is \Nordic\nRF51_SDK_8.1.0_b6ed55f\examples\ble_central, I modified the project to notify the data periodically，and it work well. but when I use sniffer to observe the communication process</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Feb 2018 22:56:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8239/how-to-disable-the-bond-and-pair" /><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/120354?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2018 22:56:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:360023c5-1323-4f35-8417-34a40dc9e381</guid><dc:creator>dcollier8</dc:creator><description>&lt;p&gt;If you do not want encryption, then use SSP, found here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.fte.com/docs/ssp.pdf"&gt;http://www.fte.com/docs/ssp.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It says this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:800.153px;"&gt;Simple Pairing Debug Mode&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:822.797px;"&gt;Simple Pairing Debug Mode uses a different Link Key for encryption&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:700.62px;top:822.797px;"&gt;than is used during&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:845.639px;"&gt;normal operation. As a component of the&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:478.952px;top:845.639px;"&gt;Host Controller for any 2.1 compliant&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:784.143px;top:845.639px;"&gt;Bluetooth&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:868.481px;"&gt;device, Simple Pairing Debug Mode can be&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:488.883px;top:868.481px;"&gt;turned on so engineers can analyze&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:776.198px;top:868.481px;"&gt;Bluetooth&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:891.323px;"&gt;data. Once the analysis is complete, Debug Mode can be switched off so that further&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:914.165px;"&gt;communication between the devices cannot be&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:518.181px;top:914.165px;"&gt;compromised. The main point here to&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:937.007px;"&gt;remember is that a different Link Key is&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:467.332px;top:937.007px;"&gt;used when in Simple Pairing Debug Mode,&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:959.849px;"&gt;thereby maintaining the enhan&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:384.107px;top:959.849px;"&gt;ced 2.1 security process.&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:1005.53px;"&gt;As an additional security feature, the Li&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:457.897px;top:1005.53px;"&gt;nk Key generated during debug mode is clearly&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:1028.38px;"&gt;identified as having been created during&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:466.14px;top:1028.38px;"&gt;the debug process. This allows the&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:749.681px;top:1028.38px;"&gt;Bluetooth&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:826.947px;top:1028.38px;"&gt;Host&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:1051.22px;"&gt;to recognize that the current Link Key is not&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:499.907px;top:1051.22px;"&gt;secure. The Host can&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:676.388px;top:1051.22px;"&gt;choose to initiate the&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:142.974px;top:1074.06px;"&gt;pairing process again, which results&lt;/div&gt;
&lt;div style="font-family:serif;font-size:19.8627px;left:432.076px;top:1074.06px;"&gt;in the generation of a new Link Key.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/120353?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2018 22:54:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ae2a9f3-f7b9-4b19-8adf-582b2321d8b5</guid><dc:creator>dcollier8</dc:creator><description>&lt;p&gt;This code is used in the BLE event handler from the BLE dispatch to get the passkey:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;static void ble_evt_dispatch(ble_evt_t * p_ble_evt)&lt;/p&gt;
&lt;p&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; on_ble_evt(p_ble_evt);&lt;/p&gt;
&lt;p&gt;... then in the above event handler:&lt;/p&gt;
&lt;p&gt;static void on_ble_evt(ble_evt_t * p_ble_evt)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (p_ble_evt-&amp;gt;header.evt_id)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case BLE_GAP_EVT_PASSKEY_DISPLAY:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_LOG_INFO(&amp;quot;event recd: BLE_GAP_EVT_PASSKEY_DISPLAY\r\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char passkey[PASSKEY_LENGTH+1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memcpy(passkey,p_ble_evt-&amp;gt;evt.gap_evt.params.passkey_display.passkey,PASSKEY_LENGTH);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; passkey[PASSKEY_LENGTH] = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Don&amp;#39;t send delayed Security Request if security procedure is already in progress.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; err_code = app_timer_stop(m_sec_req_timer_id);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APP_ERROR_CHECK(err_code);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //APP_LOG(&amp;quot;Passkey: %s\r\n&amp;quot;,passkey);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //orig: NRF_LOG_INFO(0,&amp;quot;Passkey: &amp;#39;%s&amp;#39;&amp;quot;,passkey);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_LOG_INFO(&amp;quot;Passkey: %s\r\n&amp;quot;, nrf_log_push(passkey));&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }break;//BLE_GAP_EVT_PASSKEY_DISPLAY&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps !&lt;/p&gt;
&lt;p&gt;Donzo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/29708?ContentTypeID=1</link><pubDate>Wed, 22 Jul 2015 08:38:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38eab2d5-9663-443d-966e-e8de50ab3f49</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Why do you need a passkey if you don&amp;#39;t need encrpytion? Passkey is used in the pairing process. Do you plan to have devices that have a display or keyboard so you can display or input a passkey? If not you could use static passkey, please see this &lt;a href="https://devzone.nordicsemi.com/question/45180/passkey-from-a-central-with-no-display-and-keyboard/"&gt;question&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/29707?ContentTypeID=1</link><pubDate>Wed, 22 Jul 2015 02:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7855e1b-ecff-4791-9dce-7ebcb83f9cf4</guid><dc:creator>eaglezcy</dc:creator><description>&lt;p&gt;hi peter:
thanks a lot! I have try your suggestion, and it works. but I still have one question. where is the passkey?  where can I find the passkey?  and how can I change the passkey from central?? Is there any example that have realize the function?? I can not find it in the sdk.&lt;/p&gt;
&lt;p&gt;best regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/29706?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 11:35:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbf557e2-d6f8-4937-bfa8-75667ced75a2</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Pairing is the process of creating one or more shared secret keys.&lt;/p&gt;
&lt;p&gt;Bonding is the act of storing the keys created during pairing for use in subsequent connection in order to form a trusted pair.&lt;/p&gt;
&lt;p&gt;If you disable bonding, pairing is still done, i.e. the link gets encrypted.&lt;/p&gt;
&lt;p&gt;The peripheral has a GATT server with a characteristic value and a CCCD that requires the link to be encrypted for them to be written to. In services_init(), please change:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;attr_md.write_perm); to
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.write_perm); and
BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;cccd_md.write_perm); to
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.write_perm);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The central has a GATT client that will receive BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION or BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION if it tries to write to an attribute (the characteristic value and the CCCD are attributes) that requires encryption for it to be written to. Please see the BLE_GATTC_EVT_WRITE_RSP case in client_handling_ble_evt_handler(). If one of these are received, it will call dm_security_setup_req() which will call initiate_security_request(), which will call sd_ble_gap_authenticate(). sd_ble_gap_authenticate() will initate the pairing process.&lt;/p&gt;
&lt;p&gt;For you it should be suffient to only make the changes in the peripheral to &amp;quot;disable pairing&amp;quot;, but I added the central part as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/29705?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 06:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68bc9ca8-c3e4-491c-ab0f-f2213ca54281</guid><dc:creator>eaglezcy</dc:creator><description>&lt;p&gt;hi petter:
Thanks a lot!
The example is ...\nRF51_SDK_8.1.0_b6ed55f\examples\ble_central\ble_app_multilink_central and  ...\nRF51_SDK_8.1.0_b6ed55f\examples\ble_central\ble_app_multilink_peripheral. I still have some question:
1. In this example, where can I find the passkey?? I can&amp;#39;t find the encryption key.
2. How can I disable the link to be encrypted?? I do not need the link to be encrypted.
3. I do not know how this project to do the bond and pair, and I do not find the passkey, and do not know the process of bond and pair. Is the central or the peripheral erupt the bond and pair??&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;best regards! Thanks a lot!
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable the  bond and pair?</title><link>https://devzone.nordicsemi.com/thread/29704?ContentTypeID=1</link><pubDate>Mon, 20 Jul 2015 09:20:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df09553e-e714-4c18-b656-79287950e8bc</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;ble_central is just a folder not an example. What example are you using on the central side? What example are you using on the peripheral side? SEC_PARAM_BOND 0 just disables bonding, not pairing. It is with pairing the link gets encrypted, bonding is just saving the encryption keys for later connections.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>