<?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>Pairing is asked again and again to an already bonded device nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115989/pairing-is-asked-again-and-again-to-an-already-bonded-device-nrf52832</link><description>Hello, We have a custom board with nRF52832 in production, nRF5 SDK, s132, using BLE. We recently have faced some issues regarding connection from some of our clients. 
 The problem they have described to us is: They connect to the device with a mobile</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Dec 2024 10:39:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115989/pairing-is-asked-again-and-again-to-an-already-bonded-device-nrf52832" /><item><title>RE: Pairing is asked again and again to an already bonded device nRF52832</title><link>https://devzone.nordicsemi.com/thread/513810?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 10:39:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b6baa9c-edf2-420e-9a24-9c692390860a</guid><dc:creator>DimitraN</dc:creator><description>&lt;p&gt;Hello!&lt;br /&gt;&lt;br /&gt;So since I don&amp;#39;t call&amp;nbsp;&lt;span&gt;pm_handler_secure_on_connection() anywhere, the&amp;nbsp;PM_HANDLER_SEC_DELAY_MS has no effect?&lt;br /&gt;Should I call it?&amp;nbsp;&lt;br /&gt;In my previous answer I provide you with my pm_evt_handler code&lt;br /&gt;&lt;br /&gt;The central device I found to recreate the issue was a Xiaomi tablet, but clients with phones of other brands also declared the issue. So we wanted to find a solution if we could do something on our side.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So if the issue occurs again, there is nothing we can do and this means that we will not be compatible with some devices ?&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pairing is asked again and again to an already bonded device nRF52832</title><link>https://devzone.nordicsemi.com/thread/513798?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 10:07:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13fcd69c-d370-4794-8f71-979b7c1cec16</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Not sure what phone model and brand you are seeing this on, but it looks like &lt;span&gt;an issue on the Android side on this particular phone model.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The central (phone in this case) will usually start the pairing procedure after the connection is established , or if it&amp;nbsp;&lt;/span&gt;attempts to access a protected characteristic, it will recognize the need for a higher security level and initiate the pairing process to establish the required encryption and authentication.&amp;nbsp;&lt;span style="font-family:inherit;"&gt;If not&amp;nbsp;pm_handler_secure_on_connection() will send a pairing request to the central after the PM_HANDLER_SEC_DELAY_MS&amp;nbsp;delay has expired to ask the central to initiate the pairing procedure.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pairing is asked again and again to an already bonded device nRF52832</title><link>https://devzone.nordicsemi.com/thread/509453?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 12:48:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:013c25a8-273b-4770-8c9b-c66b8bd2c220</guid><dc:creator>DimitraN</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I found a device which has the issue but I don&amp;#39;t really see the problem in sniffer..&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-135509.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-135521.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-135521.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-140416.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-141011.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-141019.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, from nRF connect mobile app I can see the logs:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_11_2D00_07-142957.png" /&gt;&lt;/p&gt;
&lt;p&gt;Please let me know if you can find any information from sniffer screenshots..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, I noticed that bonding is performed successfully the first time, but afterwards, if we disconnect it will ask to bond again, and repairing process will start. Also, sometimes GATT error 133 appeared. So, since I know that the peripheral device (nRF52832) did not erase the bonds, something happens and the phone deletes it. I dont know why but I had an idea that maybe PM_HANDLER_SEC_DELAY_MS is related to it..&lt;br /&gt;&lt;br /&gt;Therefore, I tried to change this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;o&amp;gt; PM_HANDLER_SEC_DELAY_MS - Delay before starting security. 
// &amp;lt;i&amp;gt;  This might be necessary for interoperability reasons, especially as peripheral.

#ifndef PM_HANDLER_SEC_DELAY_MS
#define PM_HANDLER_SEC_DELAY_MS 400
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;from 400 ms to 4000 ms. And it looks like it works. Also, if I set it to default value, 0, it also works.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;1) Could it be that the peer manager handler security delay is the cause of the issue? How could it be related to it?&amp;nbsp;&lt;br /&gt;2) If so, is it better to set it at 0, so that my device, as a peripheral, will never initiate security procedure and will always wait the central device to do so? &lt;br /&gt;3) Or is it recommended to set a delay, but high enough so that there is no collision.. and if this is the case, is 4000ms a good value? is there another one recommended? &lt;br /&gt;4) Also, if I set a delay, does this mean that there will be a delay before my peripheral device starts security if for some reason mobile has not started it ? and if the device starts the security, I guess the preipheral will not also start it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&amp;nbsp;&lt;br /&gt;Dimitra&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pairing is asked again and again to an already bonded device nRF52832</title><link>https://devzone.nordicsemi.com/thread/508736?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 22:48:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8f092d2-06ce-471f-8eb6-344a4aa15b68</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Would you be able to capture a sniffer trace of this?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>