<?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>How to send connection parameters update request from peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30926/how-to-send-connection-parameters-update-request-from-peripheral</link><description>Hello, 
 I want to update the connection parameters once the nrf52x (peripheral) is connected with the android (master). I tried the following: 
 In connection event i called ble_conn_params_change_conn_params () as : 
 /* new connection parameters*/</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Mar 2018 09:51:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30926/how-to-send-connection-parameters-update-request-from-peripheral" /><item><title>RE: How to send connection parameters update request from peripheral</title><link>https://devzone.nordicsemi.com/thread/122406?ContentTypeID=1</link><pubDate>Thu, 01 Mar 2018 09:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ce3e50-a5fa-4884-8f8b-ba80e5240a3e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, that is possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send connection parameters update request from peripheral</title><link>https://devzone.nordicsemi.com/thread/122361?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 18:55:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4563e203-b32e-44dc-b8d8-4aa2fffb5563</guid><dc:creator>Mabbas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thanks for your reply. Can use the code upon connection event? When the connection is successful then I can immediately send the parameter update request?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;waiting for your reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send connection parameters update request from peripheral</title><link>https://devzone.nordicsemi.com/thread/122359?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 18:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6848211-84aa-4d48-851b-8b01fb9b9e5b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="24414" url="~/f/nordic-q-a/30926/how-to-send-connection-parameters-update-request-from-peripheral"]new_conn_parameters.min_conn_interval = MSEC_TO_UNITS(6, UNIT_1_25_MS);[/quote]
&lt;p&gt;You are converting to milliseconds here, so 6 ms is not a valid value. 7.5 ms (6 &lt;span&gt;in units of 1.25 ms&lt;/span&gt;) is the lowest connection interval allowed by the BLE spec. The function&amp;nbsp;&lt;span&gt;ble_conn_params_change_conn_params() will with 6ms return the value&amp;nbsp;&lt;strong&gt;NRF_ERROR_INVALID_PARAM,&lt;/strong&gt;&amp;nbsp;and the connection parameter update request&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;will not be sent.&amp;nbsp;You should also check the return value from the function. Snippet:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;ble_gap_conn_params_t  updated_cnxn_param;
uint32_t               retval;
// Update in Connection parameters preferred by the application.
updated_cnxn_param.min_conn_interval = MIN_CONN_INTERVAL;
updated_cnxn_param.max_conn_interval = MAX_CONN_INTERVAL;
updated_cnxn_param.slave_latency     = SLAVE_LATENCY;
updated_cnxn_param.conn_sup_timeout  = CONN_SUP_TIMEOUT;
// Initialize and set-up connection parameter negotiation module.
retval = ble_conn_params_change_conn_params(&amp;amp;updated_cnxn_param);

if(retval == NRF_SUCCESS)
{
   // Procedure request succeeded. Connection parameters will be negotiated as requested.
   // BLE_CONN_PARAMS_EVT_SUCCEEDED will be notified if parameter negotiation is successful.
   NRF_LOG_INFO(&amp;quot;Procedure request succeeded. Connection parameters will be negotiated as requested&amp;quot;);
}
else
{
    // Procedure request failed.
    NRF_LOG_INFO(&amp;quot;Procedure request failed: %d&amp;quot;,retval);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="line"&gt;&lt;span class="comment"&gt;&lt;/span&gt;See &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/lib_ble_conn_params.html?cp=4_0_3_3_1_3"&gt;this page&lt;/a&gt; for more information about the&amp;nbsp;&lt;span&gt;Connection Parameters Negotiation module.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>