<?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>[nRF52833] Link encryption request when connected to an already bonded Host</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97757/nrf52833-link-encryption-request-when-connected-to-an-already-bonded-host</link><description>Hi, 
 I&amp;#39;m working on a legacy program (Peripheral) using nRF52833 and nRF5 SDK using SoftDevice S113. 
 Looking at the Peer Manager module, it seems peer_manager_handler.c is requesting the link to be encrypted immediately on connection (or after a delay</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Mar 2023 20:34:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97757/nrf52833-link-encryption-request-when-connected-to-an-already-bonded-host" /><item><title>RE: [nRF52833] Link encryption request when connected to an already bonded Host</title><link>https://devzone.nordicsemi.com/thread/415820?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 20:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a4bc2d0-29ea-43b1-8dfa-d3c0f42af853</guid><dc:creator>Marco R</dc:creator><description>&lt;p&gt;Thanks Sigurd for confirming that this&amp;nbsp;behavior is only dictated by the application requirements.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated my project include the following changes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Remove the call to &lt;code&gt;pm_handler_on_pm_evt()&lt;/code&gt; from&amp;nbsp;&lt;span&gt;&lt;span&gt;&lt;code&gt;pm_evt_handler()&lt;/code&gt;, and replace it with&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;pm_handler_pm_evt_log()&lt;/code&gt; (so Peer Manager event logging is decoupled from securing the connection).&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Add a call to&amp;nbsp;&lt;code&gt;pm_handler_secure_on_error()&lt;/code&gt; from the main BLE event handler.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Marco&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52833] Link encryption request when connected to an already bonded Host</title><link>https://devzone.nordicsemi.com/thread/415689?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 12:06:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1075aeb1-4d28-462c-b7a8-280fb9ceeb9b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]The SDK doesn&amp;#39;t seem to have a way to disable this behavior and keep the link unencrypted for as long as the Central desires.[/quote]
&lt;p&gt;I don&amp;#39;t see any reason for why you can&amp;#39;t simply remove the&amp;nbsp;&lt;span&gt;pm_handler_secure_on_connection() call. If your application later wants to secure the connection, you can call&amp;nbsp;pm_conn_secure(). Or&amp;nbsp;just wait&amp;nbsp;until&amp;nbsp;it&amp;#39;s required, by having the&amp;nbsp;pm_handler_secure_on_error() secure the connection if&amp;nbsp;a GATTC procedure fails with insufficient encryption or insufficient authentication.&lt;/span&gt;&lt;/p&gt;
[quote userid="117078" url="~/f/nordic-q-a/97757/nrf52833-link-encryption-request-when-connected-to-an-already-bonded-host"]The reason I&amp;#39;m asking is because this behavior interferes with our bonding procedure [/quote]
&lt;p&gt;Maybe you can call&amp;nbsp;pm_conn_secure() when your bonding procedure is completed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>