<?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>ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14062/ble_app_uart_c-dongle-with-passkey</link><description>Hi all, 
 I seek an advice on the passkey topic. Have been researching the topic all day but still have some confusion. I am running SDK 10.0 ble_app_uart example on nRF51 DK and ble_app_uart_c on the nRF51 dongle. The dongle connects to windows app</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 May 2016 10:47:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14062/ble_app_uart_c-dongle-with-passkey" /><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53773?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 10:47:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:011577a1-33dc-4315-8d60-8d575f9dd7d8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Then you will get the BLE_GAP_EVT_SEC_PARAMS_REQUEST event. Since you are only pairing, you can reply with sd_ble_gap_sec_params_reply(uint16_t conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, NULL, NULL); Then you will get the BLE_GAP_EVT_AUTH_KEY_REQUEST event and so on...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53772?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 10:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5da8bdeb-ea56-4c74-bfa7-0d26529adfb7</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;When you want the central to pair you call sd_ble_gap_authenticate(). It takes two arguments, the connection handle and a ble_gap_sec_params_t struct. If you want to pair and set that you have a keyboard you fill the struct with something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_gap_sec_params_t sec_param;
memset(&amp;amp;sec_param, 0, sizeof(ble_gap_sec_params_t));

sec_param.bond = false;
sec_param.mitm = false;
sec_param.lesc = 0;
sec_param.keypress = 0;
sec_param.io_caps = BLE_GAP_IO_CAPS_KEYBOARD_ONLY;
sec_param.oob = false;
sec_param.min_key_size = 7;
sec_param.max_key_size = 16;
sec_param.kdist_own.enc = 0;
sec_param.kdist_own.id = 0;
sec_param.kdist_peer.enc = 0;
sec_param.kdist_peer.id = 0;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53768?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 14:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28c7e255-f93c-4f8d-bf1c-df7d437e80ad</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;Yes. It is a lot to take. I have only seen example with device manager and I don&amp;#39;t know how to initialise security parameters without it. It seems to be simple but every time I attempt it I get lost.&lt;/p&gt;
&lt;p&gt;For eample: do I need to use &amp;quot;ble_gap_sec_params_t m_sec_params;&amp;quot; and &amp;quot;sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &amp;amp;ble_opt);&amp;quot; to start with?&lt;/p&gt;
&lt;p&gt;What do I need to change to request passkey on connection and not on bonding?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53767?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 14:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fd3574a-2347-4d03-80e9-adf8a59e7240</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes. Is anything still unclear?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53770?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 14:31:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8a09e87-67cc-40e5-83fd-4723f4c45635</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;This is the same answer as the topic I was referring to in my question. And it was your answer too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53771?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 12:25:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee628bd-3f42-484b-9085-629847ce1f85</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you use static passkey the peripheral will have display set, but it is not necessary to display the passkey, because it is static. If you want to input this static passkey on the central you shoudl set that it has a keyboard. Then when you get the BLE_GAP_EVT_AUTH_KEY_REQUEST event, you use the static passkey in sd_ble_gap_auth_key_reply().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53769?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 11:38:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05fe898a-0f26-4878-95ef-8138695c3603</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;I think that I have mislead you slightly. It is more simple than that. Could you please update the answer to the following scenario.&lt;/p&gt;
&lt;p&gt;Peripheral has a static passkey so no keyboard or display.&lt;/p&gt;
&lt;p&gt;When both devices attempt to connect then central should receive a message on uart terminal requesting to enter a passkey. Once entered (such as on mobile phone or MCP) the connection is made. That simple.&lt;/p&gt;
&lt;p&gt;Thanks for the device manager advise.&lt;/p&gt;
&lt;p&gt;Note: My peripheral uses S100 softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart_c dongle with passkey</title><link>https://devzone.nordicsemi.com/thread/53766?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 11:14:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1d678f1-447f-46dd-9d72-9dc26fae072f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you want the passkey to be sent from the central to the peripheral, the peripheral should have keyboard set and the central should have keyboard or display set.&lt;/p&gt;
&lt;p&gt;If both peripheral and central has keyboard set both sides will receive the BLE_GAP_EVT_AUTH_KEY_REQUEST event. You will have to create the passkey in the central. Send it via uart to the peripheral. Both sides use the passkey in sd_ble_gap_auth_key_reply(). See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_p___c_e_n_t_r_a_l___b_o_n_d_i_n_g___p_k___p_e_r_i_p_h___o_o_b___m_s_c.html?cp=3_6_2_1_0_2_1_3_5_2_2"&gt;this&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_p___p_e_r_i_p_h___b_o_n_d_i_n_g___p_k___c_e_n_t_r_a_l___o_o_b___m_s_c.html?cp=3_6_2_1_0_2_1_3_8_7_3"&gt;this&lt;/a&gt; MSCs.&lt;/p&gt;
&lt;p&gt;If the peripheral has keyboard set and the central has display set. The central will receive the BLE_GAP_EVT_PASSKEY_DISPLAY event, with the passkey. See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_p___c_e_n_t_r_a_l___b_o_n_d_i_n_g___p_k___p_e_r_i_p_h___m_s_c.html?cp=3_6_2_1_0_2_1_3_5_2_1"&gt;this&lt;/a&gt; MSC. Send it via uart to the peripheral. The peripheral will receive the BLE_GAP_EVT_AUTH_KEY_REQUEST event, use the passkey in sd_ble_gap_auth_key_reply(). See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_p___p_e_r_i_p_h___b_o_n_d_i_n_g___p_k___c_e_n_t_r_a_l___o_o_b___m_s_c.html?cp=3_6_2_1_0_2_1_3_8_7_3"&gt;this&lt;/a&gt; MSC.&lt;/p&gt;
&lt;p&gt;The Device Manager is optional software that handles pairing and bonding. If you are only doing pairing, I wouldn&amp;#39;t recommend using it. If you are doing bonding and it covers your use case, I would recommend using it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>