<?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>Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84369/is-there-an-api-that-can-get-the-authentication-method</link><description>Hello. I am developing using nrf52832 (S132 v7.0.1, SDK v17.0.0) as a peripheral device. 
 I want to know the authentication method of the central device when the connection is established. Is there an API that can get the authentication method? 
 Also</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Feb 2022 08:07:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84369/is-there-an-api-that-can-get-the-authentication-method" /><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/354934?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:07:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9b5733c-43fc-4515-a718-a43d656e6079</guid><dc:creator>sdi_kei</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;You can only understand the IO function when the pairing request is sent from the other party.&lt;br /&gt;I was able to understand. Thank you very much.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/354086?ContentTypeID=1</link><pubDate>Mon, 21 Feb 2022 10:16:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc5e4445-8f0e-44cb-b3bd-834a2a7d0817</guid><dc:creator>Sigurd</dc:creator><description>[quote user="sdi_kei"]The timing when you want information is when a BLE connection is made.[/quote][quote user="sdi_kei"]Is there a way to get the authentication method faster than &amp;quot;BLE_GAP_EVT_SEC_PARAMS_REQUEST&amp;quot;?[/quote]
&lt;p&gt;No.If this is a new device that is connecting(that you have no prior bond to), then the information is not known when the device connects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/353228?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 05:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b02049e5-2911-417c-a225-247e0fbffe76</guid><dc:creator>sdi_kei</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/84369/is-there-an-api-that-can-get-the-authentication-method/352806#352806"]No, you can use&amp;nbsp;sd_ble_gap_sec_params_reply() to reply with a error-code and the paring will&amp;nbsp;fail.[/quote]
&lt;p&gt;My explanation was strange. I&amp;#39;m sorry.&lt;/p&gt;
&lt;p&gt;The timing when you want information is when a BLE connection is made.&lt;br /&gt;This is because if the other party&amp;#39;s BLE device does not have an authentication method different from yours, you want to disconnect, and if they are the same, you want to perform pairing (bonding). Also, at this time, I would like to know the information on LESC.&lt;/p&gt;
&lt;p&gt;I was able to confirm the authentication method with &amp;quot;BLE_GAP_EVT_SEC_PARAMS_REQUEST&amp;quot;, but an event occurred at the timing when the BLE connection was made and pairing (bonding) was performed.&lt;br /&gt;Therefore, we could only get the information later than we originally wanted.&lt;/p&gt;
&lt;p&gt;Is there a way to get the authentication method faster than &amp;quot;BLE_GAP_EVT_SEC_PARAMS_REQUEST&amp;quot;?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/352806?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 07:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4442740f-a260-4719-b408-bec26818cd20</guid><dc:creator>Sigurd</dc:creator><description>[quote user="sdi_kei"]BLE_GAP_EVT_SEC_PARAMS_REQUEST, but this event occurs late. This is because it is confirmed that pairing will be performed when this event occurs[/quote]
&lt;p&gt;No, you can use&amp;nbsp;sd_ble_gap_sec_params_reply() to reply with a error-code and the paring will&amp;nbsp;fail.&lt;/p&gt;
&lt;p&gt;If you look at the IO capabilities(BLE_GAP_EVT_SEC_PARAMS_REQUEST, ble_gap_sec_params_t ble_gap_sec_params_t::io_caps and ::lesc), you should be able to determine&amp;nbsp;the authentication method. See the table at step 4 here:&amp;nbsp;&lt;a href="https://www.bluetooth.com/blog/bluetooth-pairing-part-2-key-generation-methods/"&gt;https://www.bluetooth.com/blog/bluetooth-pairing-part-2-key-generation-methods/&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: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/352790?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 02:00:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63aad64a-913f-4197-859d-ad708fa1731e</guid><dc:creator>sdi_kei</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;BLE_GAP_EVT_SEC_PARAMS_REQUEST, but this event occurs late. This is because it is confirmed that pairing will be performed when this event occurs. I want to know how to authenticate to determine if it&amp;#39;s a pairing device.&lt;/p&gt;
&lt;p&gt;Is there any good way?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/352551?ContentTypeID=1</link><pubDate>Fri, 11 Feb 2022 10:46:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e9ff690-489a-480d-9b56-230dcf7fc203</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I could not find a API for that. But in&amp;nbsp;BLE_GAP_EVT_SEC_PARAMS_REQUEST you get the I/O capabilities of the other device.&lt;/p&gt;
&lt;p&gt;Depending on the method used, you will get different events. See these&amp;nbsp;Message Sequence Charts:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bonding: Numeric Comparison:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v7.3.0/group___b_l_e___g_a_p___p_e_r_i_p_h___l_e_s_c___b_o_n_d_i_n_g___n_c___m_s_c.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v7.3.0/group___b_l_e___g_a_p___p_e_r_i_p_h___l_e_s_c___b_o_n_d_i_n_g___n_c___m_s_c.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bonding: Passkey Entry, User Inputs on Peripheral:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v7.3.0/group___b_l_e___g_a_p___p_e_r_i_p_h___l_e_s_c___b_o_n_d_i_n_g___p_k_e___c_d___m_s_c.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v7.3.0/group___b_l_e___g_a_p___p_e_r_i_p_h___l_e_s_c___b_o_n_d_i_n_g___p_k_e___c_d___m_s_c.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/351664?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 05:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f02719b-2d64-4a70-a567-dc4a5637c2fb</guid><dc:creator>sdi_kei</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;thank you for your answer.&lt;br /&gt;I know I can get the status of the connection, but looking at that information doesn&amp;#39;t tell me which authentication method to use.&lt;br /&gt;The authentication methods I would like to know are &amp;quot;Numeric Comparison&amp;quot; and &amp;quot;Passkey Entry&amp;quot;.&lt;br /&gt;Is it possible to obtain information like the site below?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Flib_pm_usage.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Flib_pm_usage.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there an API that can get the authentication method?</title><link>https://devzone.nordicsemi.com/thread/351310?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 11:55:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b265319a-8b5c-440c-94c5-884c0405a30e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can get the&amp;nbsp;&lt;span&gt;getting the security status of a connection using &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__peer__manager.html?cp=8_1_6_2_16_38#ga5a2760d50178059a4156f00bb6c0eb56"&gt;pm_conn_sec_status_get()&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You also have the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v7.3.0%2Fstructble__gap__evt__auth__status__t.html"&gt;BLE_GAP_EVT_AUTH_STATUS&lt;/a&gt;&lt;span&gt;&amp;nbsp;event (Authentication procedure completed event)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;         case BLE_GAP_EVT_AUTH_STATUS:
             NRF_LOG_INFO(&amp;quot;BLE_GAP_EVT_AUTH_STATUS: status=0x%x bond=0x%x lv4: %d kdist_own:0x%x kdist_peer:0x%x&amp;quot;,
                          p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.auth_status,
                          p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.bonded,
                          p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.sm1_levels.lv4,
                          *((uint8_t *)&amp;amp;p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.kdist_own),
                          *((uint8_t *)&amp;amp;p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.kdist_peer));&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>