<?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>Correct configuration for secure connections pairing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122874/correct-configuration-for-secure-connections-pairing</link><description>Hi, I want to implement a feature where the central device manually enters a fixed password (passkey) defined by the peripheral to establish a connection. I’m using the ble_app_hrs example from the nrf5_sdk_17.1.0_ddde560 SDK on the nRF52840-DK (using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jul 2025 17:57:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122874/correct-configuration-for-secure-connections-pairing" /><item><title>RE: Correct configuration for secure connections pairing</title><link>https://devzone.nordicsemi.com/thread/542676?ContentTypeID=1</link><pubDate>Wed, 16 Jul 2025 17:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a16c38b0-4872-4373-9eac-c3a3b03d24b0</guid><dc:creator>WeBBK</dc:creator><description>&lt;p&gt;hi Amanda,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The issue is fixed by the reference example link you provided.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct configuration for secure connections pairing</title><link>https://devzone.nordicsemi.com/thread/542527?ContentTypeID=1</link><pubDate>Tue, 15 Jul 2025 13:00:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25ca86fd-d7a7-4eb4-ba2e-a298ed15170b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Do you see the same issue while testing with a mobile phone? If not, comparing the &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;sinffer logs&lt;/a&gt; of them to find the differences.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct configuration for secure connections pairing</title><link>https://devzone.nordicsemi.com/thread/542207?ContentTypeID=1</link><pubDate>Fri, 11 Jul 2025 08:50:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19b4b729-9359-4d85-b971-1370319d166b</guid><dc:creator>WeBBK</dc:creator><description>&lt;p data-start="55" data-end="219"&gt;If I switch &lt;code data-start="67" data-end="86"&gt;sec_param.io_caps&lt;/code&gt; to &lt;code data-start="90" data-end="120"&gt;BLE_GAP_IO_CAPS_DISPLAY_ONLY&lt;/code&gt;, it allows the &lt;strong data-start="136" data-end="162"&gt;central device (BlueZ)&lt;/strong&gt; to correctly prompt for passkey input, as shown below.&lt;/p&gt;
&lt;p data-start="55" data-end="219"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1752223558078v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p data-start="221" data-end="459"&gt;However, the &lt;strong data-start="234" data-end="262"&gt;peripheral (nRF52840-DK)&lt;/strong&gt; does not trigger the &lt;code data-start="284" data-end="314"&gt;BLE_GAP_EVT_AUTH_KEY_REQUEST&lt;/code&gt; event for unknown reasons. As a result, the defined passkey cannot be used, and pairing fails (Central keeps requesting input repeatedly).&lt;/p&gt;
&lt;p data-start="221" data-end="459"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case BLE_GAP_EVT_AUTH_KEY_REQUEST:
        {
            NRF_LOG_INFO(&amp;quot;BLE_GAP_EVT_AUTH_KEY_REQUEST&amp;quot;);
             
            err_code = sd_ble_gap_auth_key_reply(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle,
                                                 BLE_GAP_AUTH_KEY_TYPE_PASSKEY,
                                                  (uint8_t *)&amp;quot;123456&amp;quot;); // Fixed 6-digit passkey
            APP_ERROR_CHECK(err_code);
        } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="221" data-end="459"&gt;&lt;/p&gt;
&lt;p data-start="221" data-end="459"&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Fast advertising.
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Disconnected, reason 19.
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connected.
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: GATT ATT MTU on connection 0x0 changed to 247.
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: GATT ATT MTU on connection 0x0 changed to 247.
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 1
00&amp;gt; 
00&amp;gt; &amp;lt;warning&amp;gt; app: Security failed. conn_handle: 0x0, error: 0x1
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: BLE_GAP_EVT_AUTH_STATUS: status=0x1 bond=0x0 lv4: 0 kdist_own:0x0 kdist_peer:0x0&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="461" data-end="514"&gt;Do you have any suggestions for resolving this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct configuration for secure connections pairing</title><link>https://devzone.nordicsemi.com/thread/542154?ContentTypeID=1</link><pubDate>Thu, 10 Jul 2025 20:32:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bd77df-2607-45d3-8485-f7d1d5051674</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Take a look at the example in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44658/communication-problems-between-ble_peripheral-and-ble_central-in-nrf52-project/176907"&gt;this post&lt;/a&gt;&amp;nbsp;and&amp;nbsp;test with a phone. Not sure if the issue is on your&amp;nbsp;central device (BlueZ) or not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>