<?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>Reject non-LESC pairing (not allowing Legacy pairing)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61691/reject-non-lesc-pairing-not-allowing-legacy-pairing</link><description>Hi, 
 I am working on a product based on an nRF52832 (SDK 15.3, Softdevice S112 v6.1). 
 For security purposes, I would like to restrict the pairing / bonding procedure to LE Secure connections. It should therefore forbid any pre-4.2 BLE device to connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 May 2020 07:26:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61691/reject-non-lesc-pairing-not-allowing-legacy-pairing" /><item><title>RE: Reject non-LESC pairing (not allowing Legacy pairing)</title><link>https://devzone.nordicsemi.com/thread/251830?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 07:26:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb8339f3-40b3-4947-a09b-a7baf2f2529f</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;Thanks, I no longer have an error.&lt;/p&gt;
&lt;p&gt;I am still wondering though why I am getting SEC_PARAMS_REQ event with lesc flag at 0 on connections after the first one (to a bonded device). Can you explain this ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reject non-LESC pairing (not allowing Legacy pairing)</title><link>https://devzone.nordicsemi.com/thread/251767?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 16:59:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9ad2b5d-12c3-4280-9a00-a854403ddd5b</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;You are not supposed to call sd_ble_gap_sec_params_reply directly - use pm_conn_sec_params_reply instead.&lt;/p&gt;
&lt;p&gt;The PM events all supply a conn_handle in the event argument&lt;/p&gt;
&lt;p&gt;And yes, dependig on how handlers priorities are set up, you might get the PM event before the BLE_GAP_EVT_CONNECTED was delivered to your applications event handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reject non-LESC pairing (not allowing Legacy pairing)</title><link>https://devzone.nordicsemi.com/thread/251760?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 15:32:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23d90024-06f6-4449-8454-520f48826bc2</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;I have implemented this change and it first seemed to work.&lt;/p&gt;
&lt;p&gt;Unfortunately, it seems that I still have an issue :&lt;/p&gt;
&lt;p&gt;When I connect to my device with a smartphone that supports LESC, the connection is established correctly. If I disconnect and try reconnecting again, I get into an error because PM_EVT_CONN_SEC_PARAMS_REQ seems to happen before BLE_GAP_EVT_CONNECTED, so I end up calling sd_ble_gap_sec_params_reply with a conn_handle of 0xFFFF.&lt;/p&gt;
&lt;p&gt;Is it normal to get PM_EVT before GAP_EVT_CONNECTED ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reject non-LESC pairing (not allowing Legacy pairing)</title><link>https://devzone.nordicsemi.com/thread/251180?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 07:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:696e468e-3d01-4dc1-ad14-5bada361b7a2</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The BLE_GAP_EVT_SEC_PARAMS_REQUEST is handled by the peer manager, which probably has already called sd_ble_gap_sec_params_reply() function.&lt;/p&gt;
&lt;p&gt;Try the PM_EVT_CONN_SEC_PARAMS_REQ event in the peer manager event handler function - using pm_conn_sec_params_reply() with a NULL p_sec_params pointer (that rejects security procedure).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>