<?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>Static Passkey didn&amp;#39;t pop out input passkey window</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86415/static-passkey-didn-t-pop-out-input-passkey-window</link><description>Dear all, 
 I have struggled this problem over a week. 
 I am working on our product, which need to prevent other strangers to connect to our device. After search on the Nordic Q&amp;amp;A, I decided to use static passkey. But when I connected to &amp;quot; nRF Connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Apr 2022 08:52:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86415/static-passkey-didn-t-pop-out-input-passkey-window" /><item><title>RE: Static Passkey didn't pop out input passkey window</title><link>https://devzone.nordicsemi.com/thread/363301?ContentTypeID=1</link><pubDate>Fri, 15 Apr 2022 08:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fdd2313-84b2-4fbb-8174-931e37c32921</guid><dc:creator>Since</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;I was busy on other issues last 2 weeks, and now I solved the problem with your replies.&amp;nbsp;Thank you for your assistant !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Static Passkey didn't pop out input passkey window</title><link>https://devzone.nordicsemi.com/thread/360854?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 13:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d090c78-1951-4dbc-b9e7-aa33dfff05ff</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;1. It&amp;#39;s possible to make the application to trigger security by adding in ble_evt_handler() a call to&amp;nbsp;pm_handler_secure_on_connection(). The &amp;quot;manual&amp;quot; pairing you experience without it is a result of nRF Connect for Desktop is not really a product meant for end customers, it is a tool for debugging and development. So it does not give the same UX as when used with for instance iOS, Android or Windows native BT.&lt;/p&gt;
&lt;p&gt;2.&lt;/p&gt;
[quote user="Since"]In my case, before I manual paired on nRF Connect, the nus service will work(it isn&amp;#39;t supposed happened. I want users able to use the device only after they input the right passkey.)[/quote]
&lt;p&gt;That is likely because you have not set any security requirements on the characteristics in services_init().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Static Passkey didn't pop out input passkey window</title><link>https://devzone.nordicsemi.com/thread/360801?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 12:21:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e3a60b7-e252-462b-9a00-dc2e510aebe8</guid><dc:creator>Since</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;I try to manual pairing, here are something I found.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When I run&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/ble_sdk_app_gls.html?cp=4_0_1_4_2_2_10"&gt;Glucose Application example&lt;/a&gt;&amp;nbsp;on the pca10040, nRF connect will auto pop out the passkey window. So I guess maybe it&amp;#39;s possible that I won&amp;#39;t need to manual pairing ?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;In my case, before I manual paired on nRF Connect, the nus service will work(it isn&amp;#39;t supposed happened. I want users able to use the device only after they input the right passkey.) And after I paired and entered the passkey, the program was stuck. I couldn&amp;#39;t control my device.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Static Passkey didn't pop out input passkey window</title><link>https://devzone.nordicsemi.com/thread/360778?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 11:05:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea283b8e-4f32-4d53-a21f-3dfc7ab526ce</guid><dc:creator>Kenneth</dc:creator><description>[quote user="Since"]Did you mean &lt;span&gt;the peer would elevate the security&amp;nbsp;only if there are some&amp;nbsp;characteristics(no need to be all)&amp;nbsp;configured&amp;nbsp;with higher security ?&lt;/span&gt;[/quote]
&lt;p&gt;It&amp;#39;s only required to elevate the security in that case (, some may do it anyways).&lt;/p&gt;
&lt;p&gt;I believe if you are using the nRF Connect for Desktop BLE app, you need to trigger the security manually:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfconnect_ble/UG/nRF_Connect_BLE/nRF_Connect_Pairing_devices.html"&gt;https://infocenter.nordicsemi.com/topic/ug_nrfconnect_ble/UG/nRF_Connect_BLE/nRF_Connect_Pairing_devices.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Static Passkey didn't pop out input passkey window</title><link>https://devzone.nordicsemi.com/thread/360768?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 10:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4942665-b94f-4e06-ba34-4bfa68a4641f</guid><dc:creator>Since</dc:creator><description>&lt;p&gt;Thanks for quick reply!&lt;/p&gt;
&lt;p&gt;Did you mean &lt;span&gt;the peer would elevate the security&amp;nbsp;only if there are some&amp;nbsp;characteristics(no need to be all)&amp;nbsp;configured&amp;nbsp;with higher security ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Btw I modified the&amp;nbsp;bas_init(), but nothing change.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void bas_init(void)
{
	uint32_t       err_code;
    ble_bas_init_t bas_init;
	
    // Initialize Battery Service.
    memset(&amp;amp;bas_init, 0, sizeof(bas_init));

    // Here the sec level for the Battery Service can be changed/increased.
    bas_init.bl_rd_sec        = SEC_MITM;
    bas_init.bl_cccd_wr_sec   = SEC_MITM;
    bas_init.bl_report_rd_sec = SEC_MITM;

    bas_init.evt_handler          = NULL;
    bas_init.support_notification = true;
    bas_init.p_report_ref         = NULL;
    bas_init.initial_batt_level   = 100;

    err_code = ble_bas_init(&amp;amp;m_bas, &amp;amp;bas_init);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Static Passkey didn't pop out input passkey window</title><link>https://devzone.nordicsemi.com/thread/360755?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 10:11:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97da691e-dd58-4006-8cef-85ffa3db53fd</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You might be mixing that security is made up of two configurations:&lt;/p&gt;
&lt;p&gt;- The security capabilities of the device, which is typically handled during peer_manager_init().&lt;br /&gt;- The security requirements for the services and chacteristics in your GATT database, which is typically handled during services_init().&lt;/p&gt;
&lt;p&gt;If all services and characteristics are configured with&amp;nbsp;BLE_GAP_CONN_SEC_MODE_SET_OPEN/SEC_OPEN, then the peer may not see any need to elevate the security of the link when established. In your case you can for instance (for test) elevate the security requirements for&amp;nbsp;bas_init(). The GAP params I believe must always be OPEN by spec.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>