<?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>Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32677/just-works----confirm-value-failed-when-pairing</link><description>SDK_V10, S110_V8.0.0, 
 Just Works, getting error BLE_GAP_SEC_STATUS_CONFIRM_VALUE when bonding, attached file is Sniffer data. What is the problem?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Apr 2018 15:47:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32677/just-works----confirm-value-failed-when-pairing" /><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/130013?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 15:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c62f7902-269c-4d38-9548-6e6dcff36faf</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Hi, Martin:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Slave &amp;quot;sent pairing random&amp;quot; &amp;nbsp;is done in SoftDecive?&amp;nbsp;&lt;/span&gt;&amp;nbsp;I only find API &amp;quot;sd_ble_gap_sec_params_reply()&amp;quot;, can not find how to &amp;quot;&lt;span&gt;sent pairing random&lt;/span&gt;&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/129677?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 07:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a3ce1b2-8a24-42ea-a8c2-50d45987da56</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;&lt;em&gt;(sorry for the delay)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;What I meant was for you to do this confirm value calculation manually from the Specification document. (It didn&amp;#39;t evolve the SDK or Softdevice)&lt;/p&gt;
&lt;p&gt;However, It appears that the peer is calculating the confirm value wrong, it should be calculated using the address on air (that&amp;#39;s how the Softdevice does it), but the peer is calculating using another address most probably.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/128860?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 15:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d58cc29f-0ed5-4692-b782-449f01dc690d</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Hi, Martin:&lt;/p&gt;
&lt;p&gt;Could you&amp;nbsp;&lt;span&gt;use &lt;/span&gt;&lt;span&gt;one of &lt;/span&gt;&lt;span&gt;example in SDK to&lt;/span&gt;&amp;nbsp;tell me where is the confirm value calculation in the peer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/128850?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 14:43:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb47fab7-95f1-4b1c-878d-5124bbd502a0</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Matt,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The calculation part in SoftDevice should be correct, we believe that the confirm value calculation in the peer is wrong, you can check it manually using the &lt;a href="https://www.bluetooth.com/specifications/bluetooth-core-specification" target="_blank" rel="noopener noreferrer"&gt;specification&lt;/a&gt;.&lt;br /&gt;If you are having any trouble, let me know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/128826?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 13:39:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48d32d9b-a541-4b9d-a1ee-af8370ce3932</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Hi, Martin:&lt;/p&gt;
&lt;p&gt;I think you are right. But the&amp;nbsp;&lt;span&gt;calculating process is done in SoftDevice, is it? How &amp;nbsp;can I check it or modify?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/128782?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 11:37:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a9d3331-5013-471a-a20e-d19ced11388b</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am sorry for the delay.&lt;/p&gt;
&lt;p&gt;It is most probably a peer issue calculating the confirm value wrong on the peer device that is sending the pairing request.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you check that up with your peer device and also provide any new information about your findings?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/127281?ContentTypeID=1</link><pubDate>Sat, 07 Apr 2018 10:07:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6397bac-e247-4d13-85e0-59b88f4a9615</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Hi, Martin:&lt;/p&gt;
&lt;p&gt;Please check the Sniffer data. &amp;quot;Pairing request, &lt;span&gt;pairing &lt;/span&gt;response, pairing confirm&amp;quot; are right, but &amp;quot;sent pairing random&amp;quot; is responsed with &amp;quot;confirm value failed&amp;quot;, what is the problem, and is it done in SoftDevice?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1523095626413v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/127218?ContentTypeID=1</link><pubDate>Fri, 06 Apr 2018 12:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ccba932-b258-4daf-be45-79c3c6892bbb</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Sorry for the long delay.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Have you had any progress in your research? &lt;em&gt;Any changes or anything you could update me on.&lt;/em&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you haven&amp;#39;t I would recommend you to look at the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk51.v10.0.0%2Fble_sdk_app_hrs.html&amp;amp;cp=4_0_10_4_2_2_8" target="_blank" rel="noopener noreferrer"&gt;Heart Rate Application&lt;/a&gt;&amp;nbsp;in the SDK to see&amp;nbsp;how&amp;nbsp;Just Works with pairing/bonding works.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;M&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s110.api.v8.0.0%2Fs110_msc_overview.html&amp;amp;cp=3_7_0_0_0_1" target="_blank" rel="noopener noreferrer"&gt;essage sequence charts&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What is the peripheral and central in your testing?&lt;/p&gt;
&lt;p&gt;(&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17165/ble-just-works-pairing" target="_blank" rel="noopener noreferrer"&gt;helpful thread&lt;/a&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/126368?ContentTypeID=1</link><pubDate>Thu, 29 Mar 2018 02:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2372b361-744d-4521-b063-da522571488d</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi, Martin:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have any suggestion?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125832?ContentTypeID=1</link><pubDate>Sat, 24 Mar 2018 07:30:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7e46af7-7d81-4921-9ac3-1c15b31694b6</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Hi, Martin:&lt;/p&gt;
&lt;p&gt;I modify as below:&lt;pre class="ui-code" data-mode="text"&gt;keys_exchanged.keys_central.p_enc_key  = &amp;amp;central_peer_enc_key;
keys_exchanged.keys_central.p_id_key   = &amp;amp;m_peer_table[m_connection_table[index].bonded_dev_id].peer_id; 
keys_exchanged.keys_central.p_sign_key = NULL;
keys_exchanged.keys_periph.p_enc_key   = &amp;amp;m_bond_table[index].peer_enc_key;
keys_exchanged.keys_periph.p_id_key    = NULL;
keys_exchanged.keys_periph.p_sign_key  = NULL;

err_code = sd_ble_gap_sec_params_reply(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle,
                                       BLE_GAP_SEC_STATUS_SUCCESS,
                                       &amp;amp;m_application_table[0].sec_param, 
                                       &amp;amp;keys_exchanged);

if (err_code != NRF_SUCCESS)
{
    DM_LOG(&amp;quot;[DM]: Security parameter reply request failed, reason 0x%08X.\r\n&amp;quot;, err_code);
    event_result = err_code;
    notify_app   = false;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But after bonding successfully&amp;nbsp;&lt;span&gt;several times&lt;/span&gt;, it still return Confirm Value Failed error. &amp;nbsp;Please check the Sniffer data:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ng_2D00_android2.pcapng"&gt;devzone.nordicsemi.com/.../ng_2D00_android2.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125798?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 16:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a729cb6-8d69-4b1a-a40b-33d698280fa5</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Because in file &amp;quot;device_manager_peripheral.c&amp;quot;, before call &amp;quot;&lt;span&gt;sd_ble_gap_sec_params_reply()&lt;/span&gt;&amp;quot;, there are &amp;quot;keys_exchanged.keys_central.p_enc_key &amp;nbsp;= NULL;&amp;quot;&amp;nbsp;, so it will return error&amp;nbsp;NRF_ERROR_INVALID_ADDR.&lt;/p&gt;
&lt;p&gt;I will modify it to test more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125760?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 14:32:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d84ead8d-2add-4f5b-8092-8955562d086f</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;What does &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s110.api.v8.0.0%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=3_7_0_0_0_2_1_4_25&amp;amp;anchor=ga7b23027c97b3df21f6cbc23170e55663" target="_blank" rel="noopener noreferrer"&gt;sd_ble_gap_sec_params_reply()&lt;/a&gt; return?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125747?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 14:01:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99b1b836-7b48-4ddd-8706-3252e494f8b2</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi, Martin:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I try it before,&amp;nbsp;sd_ble_gap_sec_params_reply() will return error, not response to master.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125740?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 13:37:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0918c79-c1e2-4e98-9b47-b8353c7a9d8a</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sec_param.kdist_central.enc  = 0;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Change &amp;#39;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.api.v1.0.0%2Fstructble__gap__sec__kdist__t.html&amp;amp;anchor=aa84265de1334d3ddeed29a09209f02a9" target="_blank" rel="noopener noreferrer"&gt;enc&lt;/a&gt;&amp;#39; (&lt;em&gt;Long Term Key and Master Identification&lt;/em&gt;) to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sec_param.kdist_central.enc  = 1;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;I would recommend you to use the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk51.v10.0.0%2Flib_pm_usage.html" target="_blank" rel="noopener noreferrer"&gt;macros and true/false, &lt;/a&gt;instead of just numbers&lt;/em&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125735?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 13:20:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d965c828-65b9-4b9b-8746-bcd4268a1965</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Hi, Martin:&lt;/p&gt;
&lt;p&gt;I have &lt;span&gt;searched and&amp;nbsp;&lt;/span&gt;checked all the questions in&amp;nbsp;Q&amp;amp;A firstly, but not helpful.&lt;/p&gt;
&lt;p&gt;Please check the Sniffer data, the&amp;nbsp;Pairing Response is Just Works&amp;#39;s&amp;nbsp;parameters.&lt;/p&gt;
&lt;p&gt;Below is my&amp;nbsp;sec_param setting:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sec_param.bond         = 1;
sec_param.mitm         = 0;
sec_param.io_caps      = 3;
sec_param.oob          = 0;
sec_param.min_key_size = 7;
sec_param.max_key_size = 16;
sec_param.kdist_central.enc  = 0;
sec_param.kdist_central.id   = 1;
sec_param.kdist_central.sign = 0;
sec_param.kdist_periph.enc   = 1;
sec_param.kdist_periph.id    = 1;    
sec_param.kdist_periph.sign  = 0;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Just Works -- Confirm Value Failed When Pairing</title><link>https://devzone.nordicsemi.com/thread/125731?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 12:59:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cdb660a-159a-4b3a-af13-1b6e5c2f0899</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hello Matt,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Could you check out these similar threads and see if they are of any help?&lt;/p&gt;
&lt;p&gt;Are you sure that you have set up the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk51.v10.0.0%2Flib_pm_usage.html" target="_blank" rel="noopener noreferrer"&gt;&amp;quot;just works&amp;quot;&lt;/a&gt;&amp;nbsp;correctly?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21781/just-works-example" target="_blank" rel="noopener noreferrer"&gt;Thread 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/16174/error-ble_gap_sec_status_confirm_value" target="_blank" rel="noopener noreferrer"&gt;Thread 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/22242/ble_gap_sec_status_confirm_value-how-menage" target="_blank" rel="noopener noreferrer"&gt;Thread 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>