<?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>Connection parameter update issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103982/connection-parameter-update-issue</link><description>Hello, 
 we are currently facing ann issue with the connection parameter update function. 
 wee initialized our connection parameters as following: 
 
 connection parameters are set here: 
 
 and updated in when we receive an event 
 
 
 so we thought</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Sep 2023 09:29:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103982/connection-parameter-update-issue" /><item><title>RE: Connection parameter update issue</title><link>https://devzone.nordicsemi.com/thread/447212?ContentTypeID=1</link><pubDate>Fri, 22 Sep 2023 09:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0632257-c64e-424d-981a-b897bf39020c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You are using the connection&amp;nbsp;param update module in your code.&lt;/p&gt;
&lt;p&gt;If you have this code below in your main.c, then try removing that.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    case BLE_GAP_EVT_CONN_PARAM_UPDATE:
    {
      // Accepting parameters requested
      err_code = sd_ble_gap_conn_param_update(p_gap_evt-&amp;gt;conn_handle, &amp;amp;p_gap_evt-&amp;gt;params.conn_param_update.conn_params);
      APP_ERROR_CHECK(err_code);
    } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also,&lt;br /&gt;you will get notified about&amp;nbsp;if the negotiation was a success, or if the&amp;nbsp;&lt;span&gt;negotiation&amp;nbsp;&lt;/span&gt;procedure failed in on_conn_params_evt() handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection parameter update issue</title><link>https://devzone.nordicsemi.com/thread/447089?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 13:06:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a47eaf28-96a0-403a-864a-a24e2914d2cf</guid><dc:creator>rsf</dc:creator><description>&lt;p&gt;yes i get that&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;No.     Time           Source                Destination           Protocol Length Info
237     9.618916       Master_0x506573e6     Slave_0x506573e6      LE LL    38     Control Opcode: LL_CONNECTION_UPDATE_IND

Frame 237: 38 bytes on wire (304 bits), 38 bytes captured (304 bits) on interface COM6-4.0, id 0
nRF Sniffer for Bluetooth LE
Bluetooth Low Energy Link Layer
    Access Address: 0x506573e6
    [Master Address: 55:11:5c:c4:15:5e (55:11:5c:c4:15:5e)]
    [Slave Address: fe:95:21:38:7b:d5 (fe:95:21:38:7b:d5)]
    Data Header
        .... ..11 = LLID: Control PDU (0x3)
        .... .0.. = Next Expected Sequence Number: 0 [ACK]
        .... 0... = Sequence Number: 0 [OK]
        ...1 .... = More Data: True
        ..0. .... = CTE Info: Not Present
        00.. .... = RFU: 0
        Length: 12
    Control Opcode: LL_CONNECTION_UPDATE_IND (0x00)
    Window Size: 3 (3.75 msec)
    Window Offset: 0 (0 msec)
    Interval: 24 (30 msec)
    Latency: 0
    Timeout: 200 (2000 msec)
    Instant: 93
    [Connection Parameters in: 58]
    CRC: 0x041631&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;i thought that this message indicates that we want to start with 7.5ms but the iphone wants 30ms. and i thought we update our parameters to 30ms in the update event&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    case BLE_GAP_EVT_CONN_PARAM_UPDATE:
    {
      // Accepting parameters requested
      err_code = sd_ble_gap_conn_param_update(p_gap_evt-&amp;gt;conn_handle, &amp;amp;p_gap_evt-&amp;gt;params.conn_param_update.conn_params);
      APP_ERROR_CHECK(err_code);
    } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection parameter update issue</title><link>https://devzone.nordicsemi.com/thread/447066?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 12:10:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db587fd5-aeab-4770-876a-05e2c6eb87b3</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user=""]the iphone always rejects the update[/quote]
&lt;p&gt;&lt;br /&gt;You wont&amp;#39; get 7.5ms connection interval with a iPhone.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf"&gt;https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf&lt;/a&gt;&lt;br /&gt;page&amp;nbsp;193&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1695298142731v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection parameter update issue</title><link>https://devzone.nordicsemi.com/thread/446987?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 07:35:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05a76768-58de-49bb-9486-cce55a7693e4</guid><dc:creator>rsf</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//initialize connection parameters module.
static uint32_t conn_params_init(void)
{
  ret_code_t             err_code;
  ble_conn_params_init_t cp_init;

  memset(&amp;amp;cp_init, 0, sizeof(cp_init));

  cp_init.p_conn_params                  = NULL;
  cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY;
  cp_init.next_conn_params_update_delay  = NEXT_CONN_PARAMS_UPDATE_DELAY;
  cp_init.max_conn_params_update_count   = MAX_CONN_PARAMS_UPDATE_COUNT;
  cp_init.start_on_notify_cccd_handle    = BLE_GATT_HANDLE_INVALID;
  cp_init.disconnect_on_fail             = false;
  cp_init.evt_handler                    = on_conn_params_evt;
  cp_init.error_handler                  = conn_params_error_handler;

  err_code = ble_conn_params_init(&amp;amp;cp_init);
  return err_code;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;that&amp;#39;s the conn_params_init() function. but this one shouldn&amp;#39;t cause the issue i think, because we are handling the error and the device should enter an error stat if the return value is not &amp;quot;success&amp;quot;.&lt;/p&gt;
&lt;p&gt;i think the update of the connection parameters is the issue&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;case BLE_GAP_EVT_CONN_PARAM_UPDATE:
    {
      // Accepting parameters requested
      err_code = sd_ble_gap_conn_param_update(p_gap_evt-&amp;gt;conn_handle, &amp;amp;p_gap_evt-&amp;gt;params.conn_param_update.conn_params);
      APP_ERROR_CHECK(err_code);
    } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;if i remove this line from the code we dont react to connection parameter updates and the connection breaks after 3 attempts (#define MAX_CONN_PARAMS_UPDATE_COUNT&amp;nbsp;&amp;nbsp;&amp;nbsp; 3).&lt;br /&gt;if i leave this line in the code. the connection parameter update request appears every couple of milliseconds but gets rejected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection parameter update issue</title><link>https://devzone.nordicsemi.com/thread/446984?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 07:13:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92a4244d-b498-439e-8b3b-afcb3c6f585b</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;How do you initialize the conn_params module? There is a member in the&amp;nbsp;ble_conn_params_init_t -struct called disconnect_on_fail, which determines if you want to disconnect in case you don&amp;#39;t get the parameters you want.&lt;/p&gt;
&lt;p&gt;The same struct also has pointers to event handlers for connection events. I think the example event handler from Nordic also disconnects if parameters end up outside the limits you specify. So if you based your code on an example check that too.&lt;/p&gt;
&lt;p&gt;Or is it the iphone that disconnects if you keep asking too many times? If so the I guess lowering that count is the best option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>