<?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>pm_conn_sec_params_reply didn&amp;#39;t work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107741/pm_conn_sec_params_reply-didn-t-work</link><description>I&amp;#39;m writing a program that support multi-central connect. 
 The version of SDK is v17.0.1. 
 The partial code as follow: 
 
 Sometimes the phone connect with nRF,the log output as follow: 
 
 The phone says pairing until time out. 
 The event that PM_EVT_CONN_SEC_PARAMS_REQ</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Feb 2024 08:31:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107741/pm_conn_sec_params_reply-didn-t-work" /><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/467065?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 08:31:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8520d705-5091-4978-a8be-b010e81b01bc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Choayue,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Could you reproduce the issue on any of our example ? If it can&amp;#39;t be reproduced by the example, then we will need to look into what make the implementation in your application different to the example, for example multilink example.&amp;nbsp;&lt;br /&gt;We need to be able to reproduce the issue here to be able to find the root cause.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466933?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 12:52:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dc6c4ff-9d7a-4d3f-9b8f-36c0d07ba335</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I permit one bonding at thr same time.Once the connection&amp;nbsp;be established，the restart of advertising is not be allowed until bonding is success.You get this on the code showed in the start of this case.&lt;/p&gt;
&lt;p&gt;I will try to double PM_FLASH_BUFFERS,but it is still possible that&amp;nbsp;&lt;span&gt;pm write buffer is running out.I am afraid the problem will happen in the future.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope get a method to resolve it once and for all.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466895?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 10:02:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f548225-130c-4da2-a110-76d9e3624bcf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Choayue,&amp;nbsp;&lt;br /&gt;It&amp;#39;s strange that the pm write buffer is running out. How many bonding do you do at the same time (concurrently) ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may consider doing one bonding at a time if you have multiple connection.&amp;nbsp;&lt;br /&gt;Could you try increasing the&amp;nbsp;PM_FLASH_BUFFERS to maybe double it to see if you still have the issue ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466871?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 07:37:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf1f02cd-bda4-47e7-838f-2eeeb1149d0f</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Now I test my idea ,&lt;span&gt;sd_ble_gap_sec_params_reply() didn&amp;#39;t called by&amp;nbsp;smd_params_reply().Beacuse&amp;nbsp;sec_keyset_fill() return NRF_ERROR_BUSY.But the&amp;nbsp;annotation tell me that there no buffer exist.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If&amp;nbsp;I need to change&amp;nbsp;PM_FLASH_BUFFERS?The value of&amp;nbsp;PM_FLASH_BUFFERS is 4 now,if you have a suggest value?Or there have other ways to&amp;nbsp;accelerate write so that the write buffer free enough space to deal bonding data?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466865?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 06:44:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85aede89-ce3f-4d7f-b2a5-c7ba4900fc1e</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;I try to&amp;nbsp;recurrence the error but until now it not happened.When the application running before the error happened, I try to bond with central devices like smartphone(the NRF_SDH_BLE_PERIPHERAL_LINK_COUNT is 5,so I will disconnect after bonding)as many as possible.Unfortunately,I didn&amp;#39;t count the number of bonds before the error happened.&lt;/p&gt;
&lt;p&gt;I check the code that&amp;nbsp;&lt;span&gt;security_dispatcher.c .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Smd_params_reply() called&amp;nbsp;sd_ble_gap_sec_params_reply().But there only have a&amp;nbsp;condition in if() that&amp;nbsp;sec_keyset_fill() return NRF_SUCCESS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe&amp;nbsp;sec_keyset_fill() return a err_code without NRF_SUCCESS so that the&amp;nbsp;sd_ble_gap_sec_params_reply() didn&amp;#39;t work?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m trying&amp;nbsp;&amp;nbsp;recurrence the error to test this idea.But I wan to know if there have method to deal the condition that&amp;nbsp;sec_keyset_fill() return wihout NRF_SUCCESS.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466719?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 10:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2428f696-f182-49e2-a451-870046afbdea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaoyue,&amp;nbsp;&lt;br /&gt;Could you clarify how many bond you can create until you see the error . It&amp;#39;s not very clear what you mean by &amp;quot;&lt;span&gt;It always happened after running for a while&amp;quot;. How long or how many bonds are created&amp;nbsp; until you see the error ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;As I said in the last reply, the central sent a pairing request but got no response. Please check if&amp;nbsp;sd_ble_gap_sec_params_reply() is called by the peer manager library. It should be called by&amp;nbsp;smd_params_reply() function in security_dispatcher.c&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The event you should look for is&amp;nbsp;BLE_GAP_EVT_SEC_PARAMS_REQUEST, it&amp;#39;s handled in&amp;nbsp;smd_ble_evt_handler() in the same file.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466641?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 00:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66d1e982-b668-4df5-93f0-bdedca975c6e</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I show how implement the peer manager in my application at the start of the case.If need more imformation,please&amp;nbsp; tell me&amp;nbsp;specific about it.&lt;/p&gt;
&lt;p&gt;When the device bond with the first central, the problem will not happened.It always happened after running for a while.&lt;/p&gt;
&lt;p&gt;I think it have nothing to do with reach the maximum number of bond.First,I find such a&amp;nbsp;parameter in peer_manager_types.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define PM_PEER_ID_N_AVAILABLE_IDS      256&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m more inclined to run out of memory.&lt;/p&gt;
&lt;p&gt;Then,when the problem happened,I try to restart application without pm_peers_delete(), the bonding process is normal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466523?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 13:20:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f5a9635-7287-4419-95b8-3351b0f0cfa4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chaoyue,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;From what I can see in the trace you provided, the central sent a Pairing request and was expecting the peripheral to send a pairing response back but the peripheral didn&amp;#39;t.&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/zzw.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;So most likely in the peripheral code the&amp;nbsp;sd_ble_gap_sec_params_reply() was not called. (see the sequence chart here:&amp;nbsp;&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___b_o_n_d_i_n_g___j_w___m_s_c.html?cp=5_7_3_1_2_1_5_10_7_0"&gt;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___b_o_n_d_i_n_g___j_w___m_s_c.html?cp=5_7_3_1_2_1_5_10_7_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Please note that calling&amp;nbsp;&lt;span&gt;pm_conn_sec_params_reply&amp;nbsp;() is optional and it doesn&amp;#39;t call&amp;nbsp;sd_ble_gap_sec_params_reply() directly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We will need to look why the call for sd_ble_gap_sec_params_reply() in security_manager.c is not called.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you show us how you implement the peer manager in your application ? Do you have the same problem when you test with our example in the SDK, for example ble_app_proximity ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Do you have the issue when the device bond with the first central ? Is there any chance that it is reaching the maximum number of bond ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466132?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 01:04:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3ad3ff7-c6e1-4504-a20c-e76b41643fdd</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;The brand of my phone is Honor,and I try with some brands phone that they use android os.&lt;/p&gt;
&lt;p&gt;By the way,I try to use the nRF to connect.You can see the central deal in my code.&lt;/p&gt;
&lt;p&gt;But it still puzzled me why the security params request send several times.&lt;/p&gt;
&lt;p&gt;I use nRF Sniffer get the information,unfortunately&amp;nbsp;I can&amp;#39;t analyze it.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/req.pcapng"&gt;devzone.nordicsemi.com/.../req.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I never try the samples that does a secutiry params request, because I just hope use the peer_manager to paring and bonding, this problem happened&amp;nbsp;after the application running for a while and bond with several devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_conn_sec_params_reply didn't work</title><link>https://devzone.nordicsemi.com/thread/466065?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 15:07:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c874070f-07bb-4424-83e0-b3d353cb4978</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What kind of phone are you using, have you tried with another phone from different brand?&lt;/p&gt;
&lt;p&gt;Why is the security params request sent multiple times from the phone?&lt;/p&gt;
&lt;p&gt;Can you use &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le"&gt;nRF Sniffer&lt;/a&gt; and provide a sniffer trace?&lt;/p&gt;
&lt;p&gt;Have you tried any of the samples that does a security params request such as ble_app_interactive, any issues with that?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>