<?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>Question about passkey, bonding, and pairing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12520/question-about-passkey-bonding-and-pairing</link><description>Hi, I mostly use the SDK 7.2 or SDK 10 and S110 7.1 or 8.0 
 since I have multiple custom boards that uses revision 2 and 3 chips. 
 My custom board I&amp;#39;m about to use has no displays or buttons so I use this settings. 
 sd_ble_gap_sec_params_t sec_params;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Mar 2016 00:28:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12520/question-about-passkey-bonding-and-pairing" /><item><title>RE: Question about passkey, bonding, and pairing</title><link>https://devzone.nordicsemi.com/thread/47481?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2016 00:28:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce49e501-6060-420c-a6a5-f84f30341ba2</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;To clarify my statement again, static passkey is a way to pretend to have a display. It is only relevant in the pairing scenario, and has no effect on connection establishment. There is no mechanism in Bluetooth Low Energy that lets you require a password or pin code to connect to a device, although the passkey is often confused as such. The only type of access control (for connect requests and scan requests) is white-listing, with addresses and/or identity resolving keys (IRK).&lt;/p&gt;
&lt;p&gt;Once you are connected, you can start the pairing procedure however. And it is during the pairing procedure that the static passkey &lt;em&gt;may&lt;/em&gt; be used - in the very specific scenario mentioned above. If the peer does not support security, or doesn&amp;#39;t react to the initiated pairing attempt, it can freely read and write to characteristics that does not require a security mode above &amp;quot;OPEN&amp;quot;.&lt;/p&gt;
&lt;p&gt;For your last question, I am not 100% sure, but I believe that you do not need to disable the SoftDevice to change the static passkey. You should avoid changing the static passkey while a pairing is in progress though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about passkey, bonding, and pairing</title><link>https://devzone.nordicsemi.com/thread/47480?ContentTypeID=1</link><pubDate>Sun, 13 Mar 2016 06:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae0e7bf6-06d1-48a9-8dd7-623df839ad98</guid><dc:creator>MANGO</dc:creator><description>&lt;p&gt;Thanks for pointing my misconception.&lt;/p&gt;
&lt;p&gt;However, what do you mean by &lt;code&gt;Static passkey is NOT a form for password protection for the devices.&lt;/code&gt; ?&lt;/p&gt;
&lt;p&gt;Do you mean that, even the passkey value is 123456, any centrals can connect with the peripheral by&lt;/p&gt;
&lt;p&gt;typing the wrong passkey value (like 000000)? Or is it about encryption?&lt;/p&gt;
&lt;p&gt;Also, I check this &lt;a href="https://devzone.nordicsemi.com/question/49054/multiple-passkeys/"&gt;link&lt;/a&gt; and this is quite similar to question 4.&lt;/p&gt;
&lt;p&gt;Implementing similar thing in the link, do I have to call &lt;code&gt;sd_softdevice_disable&lt;/code&gt; when changing modes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about passkey, bonding, and pairing</title><link>https://devzone.nordicsemi.com/thread/47479?ContentTypeID=1</link><pubDate>Sun, 13 Mar 2016 00:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03ec1673-90c1-4686-ba1b-64c756d3dd45</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;First things first; you might be aware of this, but I&amp;#39;m writing it because it&amp;#39;s a common misconception. The example you are referring to is a &lt;strong&gt;static&lt;/strong&gt; passkey example, used for devices that want to pretend that they have a display by having a static code instead. It offers basically no extra security over normal pairing with &lt;code&gt;BLE_GAP_IO_CAPS_NONE&lt;/code&gt;, but it can be used to make sure that you are pairing with the correct device (out of many).&lt;/p&gt;
&lt;p&gt;Static passkey is &lt;strong&gt;NOT&lt;/strong&gt; a form for password protection for the devices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1) Does passkey always require bonding?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t require bonding specifically, but it does require pairing, since Passkey Exchange is a special step that only may happen during the pairing process. Bonding only adds the exchange of keys, so it only adds an extra step after the pairing procedure has completed successfully.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2) does the passkey has to be numbers (ASCII 0, 0x30 ~ 9, 0x39)?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yes, the specification mandates this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3) Will a device be able to connect once the key changes?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The static passkey has nothing to do with connection. It will only occur during a pairing/bonding attempt, and only if at least one side requires MITM, you have display IO caps and the peer has keyboard IO caps. If you meant to ask if it would encrypt successfully, then the answer is yes, but only if the devices bonded. The static passkey is only involved in calculating the session temporal key, which is only used during the very first encryption after pairing. In future pairings, the devices can use the long-term key, but this is only exchanged during bonding. Without bonding, you would have to enter the pin again every time, and no history of the previous pin should remain - because you did not bond.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>