<?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>Best Method to set up Passkey and Bonding?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4323/best-method-to-set-up-passkey-and-bonding</link><description>I&amp;#39;m working in the ble_app_lbs example, with a PCA10001 eval board, softdevice 110, and Nordic&amp;#39;s Master Control Panel. 
 In the example code, I&amp;#39;ve changed button 1&amp;#39;s functionality to just toggle LED 1 when pressed (I wanted to make sure my code was seeing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Nov 2014 12:23:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4323/best-method-to-set-up-passkey-and-bonding" /><item><title>RE: Best Method to set up Passkey and Bonding?</title><link>https://devzone.nordicsemi.com/thread/15407?ContentTypeID=1</link><pubDate>Wed, 05 Nov 2014 12:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2a287ee-dcd2-4ffd-af67-782aa53726fb</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;&lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.0.1/s110/html/a00858.html"&gt;This&lt;/a&gt; MSC should be helpful.&lt;/p&gt;
&lt;p&gt;When you get the &lt;code&gt;BLE_GAP_EVT_SEC_PARAMS_REQUEST&lt;/code&gt; event you can simply check if the button is pressed and return &lt;code&gt;sd_ble_gap_sec_params_reply()&lt;/code&gt;with &lt;code&gt;BLE_GAP_SEC_STATUS_SUCCESS&lt;/code&gt; if it is or for example &lt;code&gt;BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP&lt;/code&gt; if it&amp;#39;s not.&lt;/p&gt;
&lt;p&gt;You may have to modify the if/else that comes after &lt;code&gt;sd_ble_gap_sec_params_reply()&lt;/code&gt; as well, so the peripheral doesn&amp;#39;t believe it&amp;#39;s paired.&lt;/p&gt;
&lt;p&gt;It seems Master Control Panel will disconnect if pairing fails.&lt;/p&gt;
&lt;p&gt;I tested this with ble_app_hrs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>