<?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>Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78780/long-pairing-time-with-secure-connection</link><description>I&amp;#39;m using the nrf52810 with S112 in peripheral mode. Using the example blinky firmware and mobile app works perfectly with my Android and iPhone. However when I add in passkey pairing with LESC it takes over 30 seconds after the passkey entry on my phone</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Aug 2021 14:25:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78780/long-pairing-time-with-secure-connection" /><item><title>RE: Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/thread/326594?ContentTypeID=1</link><pubDate>Wed, 25 Aug 2021 14:25:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b6ad0b3-4259-4bb0-bd04-7a7b25494724</guid><dc:creator>dtran11</dc:creator><description>&lt;p&gt;That did the trick! Reduced it down to several seconds. Thanks for the great support.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/thread/326522?ContentTypeID=1</link><pubDate>Wed, 25 Aug 2021 11:34:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad230ce9-fac9-4823-8381-c0648c4dbe57</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for providing the sniffer traces. I think the main reason for the slow pairing time must be that your peripheral is requesting a quite slow long connection interval at beginning of the pairing procedure.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1629891060278v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;To fix this I would suggest you that you keep the connection interval short (i.e. fast) until after the link has become secured. This will also ensure a fast service discovery.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a title="Connection Parameters Negotiation" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_ble_conn_params.html?cp=8_1_3_2_4"&gt;Connection Parameters Negotiation&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/thread/326436?ContentTypeID=1</link><pubDate>Tue, 24 Aug 2021 23:06:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5393b678-45a6-4bbb-b7f9-734537ac363e</guid><dc:creator>dtran11</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_2D00_lesc.pcapng"&gt;devzone.nordicsemi.com/.../ble_2D00_lesc.pcapng&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_2D00_lesc_5F00_2.pcapng"&gt;devzone.nordicsemi.com/.../ble_2D00_lesc_5F00_2.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I uploaded two capture files from Wireshark. It seems to be doing a lot of this for more than 30 seconds:&lt;/p&gt;
&lt;p&gt;310 16.364429 Slave_0x649749d3 Master_0x649749d3 SMP 47 Rcvd Pairing Random&lt;br /&gt;311 16.724143 Master_0x649749d3 Slave_0x649749d3 SMP 47 Sent Pairing Confirm&lt;br /&gt;312 16.724541 Slave_0x649749d3 Master_0x649749d3 LE LL 26 Empty PDU&lt;br /&gt;313 17.084151 Master_0x649749d3 Slave_0x649749d3 LE LL 26 Empty PDU&lt;br /&gt;314 17.084381 Slave_0x649749d3 Master_0x649749d3 SMP 47 Rcvd Pairing Confirm&lt;br /&gt;315 17.444158 Master_0x649749d3 Slave_0x649749d3 SMP 47 Sent Pairing Random&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/thread/325959?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 12:22:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c49472fe-af06-41a0-a335-6fa0050cbeb0</guid><dc:creator>dtran11</dc:creator><description>&lt;p&gt;Thank you for your response. I use peer manager and call&amp;nbsp;&lt;span&gt;nrf_ble_lesc_request_handler() in the main loop. Everything works but it&amp;#39;s just slow to connect (30seconds) when I enable LESC.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ll try to see how I can sniff trace. Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/thread/325862?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 08:19:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ee6afaf-1127-41d3-92a1-80bfd4a9c05d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi dtran,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to capture a sniffer trace so we can inspect that caused the 30 seconds delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The sequence chart for the LESC process is described &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.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___p_d___m_s_c.html?cp=4_7_3_1_2_1_5_10_6_2"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We need to look into how you calculate the DHKey . Do you use peer manager ? Have you called&amp;nbsp;nrf_ble_lesc_request_handler() in the main loop (usually inside&amp;nbsp;idle_state_handle() ) . The DH key calculation should be done in main context.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long pairing time with secure connection</title><link>https://devzone.nordicsemi.com/thread/325785?ContentTypeID=1</link><pubDate>Thu, 19 Aug 2021 14:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:928f35b6-d8fb-4831-b96e-b67b37e4dc62</guid><dc:creator>dtran11</dc:creator><description>&lt;p&gt;Update: it&amp;#39;s significantly faster if I disable SEC_PARAM_LESC. However LESC is desired. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>