<?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>peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55866/peer_manager_handler-connection-security-failed-role-peripheral-conn_handle-0x0-procedure-encryption-error-4102</link><description>SDK16.0 
 nRF52DK 
 HTS example 
 I got this error msg in the RTT log while running the example: 
 peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102 
 
 What shall I do to fix it?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jan 2020 10:00:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55866/peer_manager_handler-connection-security-failed-role-peripheral-conn_handle-0x0-procedure-encryption-error-4102" /><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/229793?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2020 10:00:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64362932-0170-4059-af54-35f653b2653f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;On the nRF, the easiest is to run the Nordic Command Line Tools command:&lt;br /&gt;&amp;quot;nrfutil --eraseall&amp;quot;&lt;/p&gt;
&lt;p&gt;and the reprogram your application. Let me know if you are having trouble doing this. If so, what IDE do you use?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What is your other device? If it is a phone, you must enter your bluetooth settings and select something like &amp;quot;Forget Device&amp;quot;. If it is another nRF52810 you are trying to connect to, then you should erase that chip and reprogram it like the other one.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/229785?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2020 09:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd4500b0-ed1d-4997-949e-c52d658397a6</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;How to erase the bonding information?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/227710?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 14:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4984d775-88b9-432b-b337-55baf2c0e5c8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I don&amp;#39;t know what numbers the events are coming from, but what I am interrested in is the log messages coming from the peer_manager_handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now. Did you try to erase the bonding information both on the nRF and on the connected device? Please let me know if you are not sure how to do that. Also, please let me know what you are trying to connect to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/226679?ContentTypeID=1</link><pubDate>Sun, 22 Dec 2019 00:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d36c2f48-f1d5-48fc-9561-a61114934583</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;From the log below:&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Registering connection handle: 0x0000&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: Connected.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: start timer here&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: pm_evt_handler, event id: 0x1&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: pm_evt_handler, event id: 0x3&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: ble_cube_on_ble_evt, evt: 0x14&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;We can see that the error happened after the ble connected. When the p_evt -&amp;gt;evt_id is 0x3, it reported this error.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Please give me some hints on how to fix it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/226574?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 13:30:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:817427f9-a90f-475a-ac1a-ed0c6ea9f18f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;This event is coming after a BLE_GAP_EVT_CONNECTED event, right? Are you trying to connect to it?&lt;/p&gt;
&lt;p&gt;Regarding the LOG LEVEL 4, please check that app_timer_init() is called before log_init() in your main() function. I believe that there is a bug in some of the SDK examples from SDK16.0.0 that has this in the reverse order.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/226551?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 12:21:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42bfc204-e2ed-4f72-8314-5c962bf7a7c7</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;Sorry my bad. Now I can see my log. bug there is only one debug info. I put it here:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Registering connection handle: 0x0000&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: Connected.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: start timer here&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: pm_evt_handler, event id: 0x1&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; app: pm_evt_handler, event id: 0x3&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;I don&amp;#39;t see its helpful. Maybe as you said, its just because other device. Anyway it doesn&amp;#39;t stop the mobile connect to the app.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/226544?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 11:54:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdeb1c32-eb47-4292-b96a-21fc94a33420</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;There is NO other device connecting my DK. Maybe its the USB driver coz I keep receiving msgs says that the disk is not ejected properly. Anyway, I change the LOG LEVEL to 4 by changing sdk_config.h, and now I see nothing in the RTTClient. I don&amp;#39;t know what&amp;#39;s happened. You sure the level 4 work?&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: peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102</title><link>https://devzone.nordicsemi.com/thread/226538?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 11:32:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2495653-5ea5-4d36-9ab8-c50971e0a227</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Searching though this forum, it seems like most of these error messages with error code 0x4102 comes from one of the devices that already has stored bonding information, while the other one does not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please try to delete the flash entirely (you can use &amp;quot;nrfjprog -e&amp;quot;), and reprogram it, and then delete the bonding information on your other device. What sort of the device is your other device? And the device that print this error message, is that the central or the peripheral?&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, please try to set the log level to debug by changing:&lt;/p&gt;
&lt;p&gt;#define NRF_LOG_DEFAULT_LEVEL 3&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;#define NRF_LOG_DEFAULT_LEVEL 4&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What does the log say then?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>