<?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>bonding issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4448/bonding-issue</link><description>i was trying to implement bonding in ble_app_hrs example(SDK V6.1.0 and soft device v7.0.0)
i have given params 
 #define SEC_PARAM_TIMEOUT 30 
#define SEC_PARAM_BOND 1 
#define SEC_PARAM_MITM 1 
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_YESNO</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Nov 2014 09:29:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4448/bonding-issue" /><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15801?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2014 09:29:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eb7c6c9-602e-4a49-89bd-81ecf1fe65d0</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;you are welcome. The API accepts only ASCII values. This is documented here -&amp;gt; &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.0.1/s110/html/a00228.html"&gt;developer.nordicsemi.com/.../a00228.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15800?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2014 09:25:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:176619ad-8eac-4968-af0a-7ce3ea0b65be</guid><dc:creator>sruthiraj koodathil</dc:creator><description>&lt;p&gt;thnks ....&lt;/p&gt;
&lt;p&gt;is it necessary to use ascii values? why?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15799?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2014 09:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce0e6cbc-c481-46c1-bc91-254a1c1b617b</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;Those are the ASCII values of 0x01, 0x02 etc. In your case, you should use 0x35, 0x36, 0x37, 0x38, 0x39, 0x30.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15798?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2014 08:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34b8f909-b1de-4191-9f42-c26c265e87c8</guid><dc:creator>sruthiraj koodathil</dc:creator><description>&lt;p&gt;wat is behind in using 0x31,0x32.... instead of 0x01,0x02....? i dnt knw whether dis is a stupid question...&lt;/p&gt;
&lt;p&gt;if i want to use no.s 567890 ,what shud i realy use instead of dis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15797?ContentTypeID=1</link><pubDate>Tue, 18 Nov 2014 10:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f3748c0-8ed1-4514-a0b3-7973e8afbc70</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;Example code for passkey 123456.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define STATIC_PASSKEY          {0x31, 0x32, 0x33, 0x34, 0x35, 0x36}

ble_opt_t      opt;
static uint8_t config_passkey[BLE_GAP_PASSKEY_LEN]  = STATIC_PASSKEY;

opt.gap_opt.passkey.p_passkey = m_config_passkey;

err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &amp;amp;opt);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15794?ContentTypeID=1</link><pubDate>Tue, 18 Nov 2014 10:54:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2943316e-6527-469a-aa9a-8ff43abfa310</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;@ dis is the passkey i have to enter while bonding ryt?  :&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;@ in dm_ble_evt_handler i have assingned array passkey[6] as {1,2,3,4,5,6}.&lt;/p&gt;
&lt;p&gt;It looks to me that you want to have a static pass key (i.e you want both the devices to use a preconfigured passkey). Is this correct? In this case, you will need to use the options API (sd_ble_opt_set with opt_id = BLE_GAP_OPT_PASSKEY) to set the passkey before you start advertising.&lt;/p&gt;
&lt;p&gt;A typical use case of this is defined as an MSC here -&amp;gt; &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.0.1/s110/html/a00861.html"&gt;developer.nordicsemi.com/.../a00861.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Refer here for documentation of this option -&amp;gt; &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.0.1/s110/html/a00228.html"&gt;developer.nordicsemi.com/.../a00228.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15793?ContentTypeID=1</link><pubDate>Tue, 18 Nov 2014 10:38:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e58e74b6-6eca-4a58-94dc-73fdf1f2b1df</guid><dc:creator>sruthiraj koodathil</dc:creator><description>&lt;p&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.passkey_display.passkey..... dis is the passkey i have to enter while bonding ryt?
in dm_ble_evt_handler i have assingned array passkey[6] as {1,2,3,4,5,6}... nd try to bond by entering dis key... mcp shows bonded true.. but connection  is getting lost&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15796?ContentTypeID=1</link><pubDate>Tue, 18 Nov 2014 09:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dffca283-d296-4f84-b8c9-7cdadc7b3d39</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;The i/o capabilities are checked by the stack. You can either use display the passkey on a terminal window on your PC (you need to send the passkey over UART) or set your SEC_PARAM_IO_CAPABILITIES to BLE_GAP_IO_CAPS_NONE (no keyboard/no display).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15795?ContentTypeID=1</link><pubDate>Tue, 18 Nov 2014 09:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8408136-2f76-40ba-b494-d7a45506a4b1</guid><dc:creator>sruthiraj koodathil</dc:creator><description>&lt;p&gt;when i tried to bond from master control panel,which part of the code checking the i/o capabilities and displaying pairing code... actually am working on nrf51822 eveluation board with no lcd no keyboard,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bonding issue</title><link>https://devzone.nordicsemi.com/thread/15792?ContentTypeID=1</link><pubDate>Thu, 13 Nov 2014 13:35:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29817137-b8fc-4b2b-bc23-3b3dd37f8347</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;Hi Sruthiraj,&lt;/p&gt;
&lt;p&gt;What is the IO Capability of your Master Control Panel? If you have not changed it, then it will be the default &amp;#39;Keyboard And Display&amp;#39;. So you will be in a situation where the initiator (Master) has a &amp;#39;Keyboard And Display&amp;#39; and the responder (Slave) has &amp;#39;DisplayYesNo&amp;#39;. In this case, as per spec, the responder will have to display and the initiator will have to input. And this is probably what is happening for you.&lt;/p&gt;
&lt;p&gt;There are two things you can do now.&lt;/p&gt;
&lt;p&gt;1 . On the slave side, check if you are getting a BLE_GAP_EVT_PASSKEY_DISPLAY event. When you do, you will have to get the passkey contained in p_ble_evt-&amp;gt;evt.gap_evt.params.passkey_display.passkey and enter it when the Master Control Panel prompts you for the key.&lt;/p&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;p&gt;2 . On the Master Control Panel, change the IO Capabilities to &amp;#39;No Keyboard or display&amp;#39;. (You can do it in File -&amp;gt; Options -&amp;gt; Security) and then do &amp;#39;Bond&amp;#39; from Master Control Panel. If Master Control Panel log says &amp;#39;Bond already exists with the device&amp;#39;, then please restart Master Control Panel, and try again (you will need to set the IO capabilities again). Please note that in this case, the generated key will be &amp;#39;unauthenticated no MITM protection&amp;#39; key. If you want MITM, then please use the 1st approach.&lt;/p&gt;
&lt;p&gt;See Table 2.5 (Mapping of IO Capabilities to STK Generation Method) of Bluetooth Specification Vol 3, Part H Section 2.3.5.1 for more information.&lt;/p&gt;
&lt;p&gt;Cheers,
Balaji&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>