<?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>Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/175/setting-a-passkey</link><description>Hello! I am trying to develop on the nRF51822 eval board as called PCA10001. The programming interface I use is uVision4 on win7. 
 I would set a static PASSKEY for the pairing process in the reference code &amp;quot;ble_app_hrs&amp;quot;. I add &amp;quot;sd_ble_gap_authenticate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jul 2015 03:08:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/175/setting-a-passkey" /><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/976?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2015 03:08:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66250a76-91b4-46bf-8097-a05cb160ae8c</guid><dc:creator>yiran</dc:creator><description>&lt;p&gt;So what if I neither set IO capabilities to BLE_GAP_IO_CAPS_NONE nor use UART? Central device will be rejected directly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/974?ContentTypeID=1</link><pubDate>Sun, 30 Mar 2014 01:54:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e26efef-dcfc-4624-8707-53a982ae9571</guid><dc:creator>julian</dc:creator><description>&lt;p&gt;for BLE_GAP_IO_CAPS_DISPLAY_YESNO device, can the passkey be generated on device, and entered in the phone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/973?ContentTypeID=1</link><pubDate>Mon, 05 Aug 2013 03:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ce6a25f-9996-4eff-aa1f-d237b4680258</guid><dc:creator>Elca</dc:creator><description>&lt;p&gt;Hi, Audun,
The final application is using the PASSKEY with smart phone while the device has no keyboard. In initial step, if we use an UART connected to the PCA10001, and save the PASSKEY in a non-volatile memory then remove the UART. The next time pairing with another smart phone, will PCA10001 request this 2nd smart phone for the PASSKEY? Of couse the PASSKEY value is identical with the first time pairing we saved in PCA10001.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/972?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2013 09:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6de41ab6-fcea-40e0-8cf9-5c87b7c98f5f</guid><dc:creator>Audun</dc:creator><description>&lt;p&gt;Hi,
the passkey is needed every time the smartphone pairs with the device.
The pairing/bonding procedure happens the first time the devices are connected. Once they are paired they can be disconnected/connected freely without needing to enter the passkey again.&lt;/p&gt;
&lt;p&gt;However if you remove the device from the smartphone device list, or if your PCA10001 application doesn&amp;#39;t save the pairing information in non-volatile memory, the pairing information will be lost and a new pairing procedure (with passkey entry) has to be performed the next time you want to connect the devices. The &amp;quot;Bond manager&amp;quot; SDK component can be used to store pairing information (keys, addresses) to Flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/971?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 23:53:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4406aaeb-2e56-4d26-b15a-910604906e29</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;Once the PASSKEY has been saved in PCA10001, can it pair with the smart phone by PASSKEY if we remove the UART connection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/975?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 23:53:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c097dc64-089d-43b6-a008-95a3fa5ddd27</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;Once the PASSKEY has been saved in PCA10001, can it pair with the smart phone by PASSKEY if we remove the UART connection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/966?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 11:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0095d031-a541-469b-bd34-3ff3c2bd1465</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;To clean things up, I&amp;#39;d be happy if you could evaluate the answers you have received and accept one of them if you feel it&amp;#39;s sufficient. If not, it might be useful to expand your question a little and provide further information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/968?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2013 01:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41ab2410-acb5-4c14-8bb8-25ce7ca0bdf3</guid><dc:creator>Elca</dc:creator><description>&lt;p&gt;thanks for the reply, and I&amp;#39;ll check it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/969?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2013 00:40:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46c16315-1155-47ac-8e5a-165ca3148c12</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;thanks for the answers, and I&amp;#39;ll check it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/977?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2013 00:40:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f9ebe2-4985-46d4-8c92-eb2730b47028</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;thanks for the answers, and I&amp;#39;ll check it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/970?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2013 09:58:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45e955ef-8e7d-4ee0-a7d4-8563d7b421b8</guid><dc:creator>Audun</dc:creator><description>&lt;p&gt;As Mihail pointed out, the IO capability flags are used to specify how the user can interface with the peripheral. If the peripheral has a numerical keyboard a 6-digit passkey can be used in the pairing process. The passkey is typically generated randomly and displayed on the Central device (iPhone), and the user has to enter the passkey on the Peripheral device. If the keys match, the pairing process succeeds.&lt;/p&gt;
&lt;p&gt;For devices without any displays/keyboards/buttons, &amp;quot;Just Works&amp;quot; encryption is used in the pairing process. This is basically pairing with a static key.&lt;/p&gt;
&lt;p&gt;By setting IO capabilities to BLE_GAP_IO_CAPS_NONE the iPhone won&amp;#39;t ask for a passkey to be entered.
However, if you &lt;em&gt;want&lt;/em&gt; to use passkey in your application, you can for example use the UART to enter the passkey on your connected PC and transmit the passkey to the PCA10001.&lt;/p&gt;
&lt;p&gt;Note that it&amp;#39;s up to the application to read user input and notify the SoftDevice (see sd_ble_gap_auth_key_reply())&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting a PASSKEY</title><link>https://devzone.nordicsemi.com/thread/967?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2013 05:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61cec56a-d6ab-46bc-b722-19852c750cf8</guid><dc:creator>Mihail</dc:creator><description>&lt;p&gt;Just to say that you cannot have static PASSKEY and next are the answers:&lt;/p&gt;
&lt;p&gt;Question 1, Did I erase anything so that original &amp;quot;ble_app_hrs&amp;quot; code can not work?&lt;/p&gt;
&lt;p&gt;Example does use:
&lt;code&gt;#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**&amp;lt; No I/O capabilities. */&lt;/code&gt;
So device does not have capabilities for entering PASSKEY, in this case another association  model is used.&lt;/p&gt;
&lt;p&gt;Question 2, what is the proper way to add the PASSKEY for the pairing?
This depends on your device capabilities, in other words does it has keyboard.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BLE_GAP_IO_CAPS_DISPLAY_ONLY      0x00   /**&amp;lt; Display Only. */
#define BLE_GAP_IO_CAPS_DISPLAY_YESNO     0x01   /**&amp;lt; Display and Yes/No entry. */
#define BLE_GAP_IO_CAPS_KEYBOARD_ONLY     0x02   /**&amp;lt; Keyboard Only. */
#define BLE_GAP_IO_CAPS_NONE              0x03   /**&amp;lt; No I/O capabilities. */
#define BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY  0x04   /**&amp;lt; Keyboard and Display. */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Question 3:
Check the ble_app_gls example from documentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>