<?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>nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1659/nrf51822-peripheral-with-passkey</link><description>Hi,
like many others, I&amp;#39;m confused with Peripheral Passkey Connection. 
 I&amp;#39;m playing with the ble_app_hrs, in order to be able to setup a Connection Passkey (for the moment I would like to have a static hard-coded passkey).
The goal of my application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Jul 2015 20:19:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1659/nrf51822-peripheral-with-passkey" /><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7372?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2015 20:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:174e4320-af5a-407b-8d83-327fb31e2cd5</guid><dc:creator>andrey</dc:creator><description>&lt;p&gt;Could you expand on your answer? Does the &amp;quot;passkey display event&amp;quot; happen on nRF side or for a host? What else must be added except the &lt;code&gt;sd_ble_opt_set()&lt;/code&gt; call?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7373?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2015 22:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43440a03-6421-4250-94fc-e8ebc6ff83f3</guid><dc:creator>Stephen</dc:creator><description>&lt;p&gt;This information appears to no longer be relevant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7371?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2014 08:14:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b306691-2b8c-4654-8287-6250395a910c</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;With the latest softdevice &lt;a href="http://www.nordicsemi.com/eng/Products/S110-SoftDevice-v7.0"&gt;www.nordicsemi.com/.../S110-SoftDevice-v7.0&lt;/a&gt; you will be able to set a static passkey.&lt;/p&gt;
&lt;p&gt;By using the API call sd_ble_opt_set() with the structure ble_gap_opt_passkey_t, then the passkey display event will come with the passkey you set.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7370?ContentTypeID=1</link><pubDate>Mon, 21 Apr 2014 02:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f484ebe1-c078-4c1e-b49c-ff450d264124</guid><dc:creator>Juliane</dc:creator><description>&lt;p&gt;Hi Samuele,&lt;/p&gt;
&lt;p&gt;We have implemented the authentication procedure at application level using a custom GATT Service/Characteristics and checking for a password (that can be static or changeable) to authenticate the connected device.&lt;/p&gt;
&lt;p&gt;I also want to implement the authentication procedure at application level by adding a custom Service/Charateristics and checking for a changeable password,Could you share me the code .&lt;/p&gt;
&lt;p&gt;I am looking forward receiving your reply!
Thanks so much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7369?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2014 11:38:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63f973d5-28be-4c6f-9df3-7960992ccdd6</guid><dc:creator>Samuele Forconi</dc:creator><description>&lt;p&gt;Hi, as Ole Morten said, there isn&amp;#39;t a Bluetooth LE standard way to obtain a static authentication with such devices.
We have implemented the authentication procedure at application level using a custom GATT Service/Characteristics and checking for a password (that can be static or changeable) to authenticate the connected device.
I haven&amp;#39;t found any other solution yet...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7368?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2014 02:45:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73fecd4e-05ee-41b4-9123-54a3a1861242</guid><dc:creator>Juliane</dc:creator><description>&lt;p&gt;Hi Samuele,&lt;/p&gt;
&lt;p&gt;I have the same problem with you and I want to know wheather your problem solved.&lt;/p&gt;
&lt;p&gt;Could you share the solutions with me ,thank you so much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7367?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2014 14:21:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c82eac2-9065-4074-b41c-e1d100300290</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I don&amp;#39;t have any readymade suggestions for anything like this, but it&amp;#39;s certain that implementing this on the application level is better than trying to use a static Bluetooth passkey for bonding. Since passkeys are only 6 digits, it would be trivial for someone to brute-force this if wanted.&lt;/p&gt;
&lt;p&gt;One possibility could for example be to have the two devices share a key beforehand (i.e. as part of the firmware image and of the app), and then doing encryption of a dynamically shared value, comparing the results and then only let the device access the configuration mode if the values matches. If security is of great concern, I would however recommend you to talk to some security expert before moving ahead, as there could very well be flaws in such scheme, that I&amp;#39;ve overlooked.&lt;/p&gt;
&lt;p&gt;Also, I think you&amp;#39;re better off by just always having the services there, but just disallowing operations before authentication has been passed. This saves you the trouble of sending Service Changed indications and similar, when the service setup changes.&lt;/p&gt;
&lt;p&gt;Finally, since I believe my first reply answered your original question, I&amp;#39;d be happy if you could accept it, to clear up this question. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7366?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2014 17:01:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d75929b6-e942-47a0-9f3c-1420ffb7f595</guid><dc:creator>Samuele Forconi</dc:creator><description>&lt;p&gt;Hi,
thanks for your answer.&lt;/p&gt;
&lt;p&gt;So, setting a static passkey to pair with a Peripheral Device seems to be unfeasible... unless you write your own application-auth layer on top of BLE.&lt;/p&gt;
&lt;p&gt;I was thinking about the passkey pairing because I have a BLE Peripheral Device that needs to work in 2 modes: CONF_MODE and WORK_MODE, in CONF_MODE the device should expose some configuration services/characteristics that only a Device Manager (the man who know the password) should be able to edit, while in WORK_MODE the device exposes others services/characteristics, those needed for its ordinary work. The two operating modes are switched by pressing a button on the board.&lt;/p&gt;
&lt;p&gt;Do you have any experience/suggestions/solutions on how to implement a BLE Peripheral Device that should be capable to authenticate only the users that have the right &amp;quot;password&amp;quot;?&lt;/p&gt;
&lt;p&gt;Thanks again for your answer.
Regards,
Samuele.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 Peripheral with Passkey</title><link>https://devzone.nordicsemi.com/thread/7365?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2014 12:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e99bf3c5-8b6a-48f9-b706-af17cecdbe9b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;In general, using a static passkey isn&amp;#39;t really possible with BLE. It has previously been discussed for example &lt;a href="https://devzone.nordicsemi.com/index.php/feature-request-regarding-passkey-authorization"&gt;here&lt;/a&gt;, &lt;a href="https://devzone.nordicsemi.com/index.php/setting-a-passkey"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/index.php/pincode"&gt;here&lt;/a&gt;, and I&amp;#39;d recommend you to read all of those, as they all include information that may be useful to find a good security scheme for your application.&lt;/p&gt;
&lt;p&gt;Calling sd_ble_gap_sec_info_reply() is most often handled by the bond manager. For an example of how to use the bond manager, you can refer to &lt;a href="https://github.com/NordicSemiconductor/nrf51-ble-app-lbs/compare/require-encryption-5.1.0"&gt;this branch&lt;/a&gt; of the &lt;a href="https://github.com/NordicSemiconductor/nrf51-ble-app-lbs"&gt;nrf51-ble-app-lbs&lt;/a&gt; example application.&lt;/p&gt;
&lt;p&gt;For completeness, if you want to implement this yourself instead, you are supposed to reply to this event with the keys for the connected device. You should be able to find the connected device in your database of bonded devices by using the information in the sec_info_request event, and you should pass the LTK that should be used back to the softdevice in the _reply() call. You can refer to &lt;a href="https://devzone.nordicsemi.com/documentation/nrf51/5.1.0/html/a00882.html"&gt;this MSC&lt;/a&gt;, as well as the bond manager code for details. Beware that implementing a bond manager is not trivial, and will require a good understanding of the relevant parts of the Core Specification, in particular Volume 3, Part H.&lt;/p&gt;
&lt;p&gt;Finally, using _authenticate() is not recommended, especially not when working with iOS devices, as explained in Apple&amp;#39;s &lt;a href="https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf"&gt;Bluetooth Accessory Design Guidelines&lt;/a&gt;. Instead, you should make sure to set the permissions as you want on your characteristics (see the usage of BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM() above), so that an error will be returned to the Central when it tries to do something that requires encryption. This error will then trigger most Central devices to automatically start bonding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>