<?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>What&amp;#39;s the actual connection interval used?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4866/what-s-the-actual-connection-interval-used</link><description>Hi, 
 I&amp;#39;m trying to get the actual connection interval used between my nRF51822 device and iOS device.
I have read this article , but I cannot get it worked.
I used sd_ble_gap_ppcp_get() function in BLE_GAP_EVT_CONNECTED and BLE_GAP_EVT_CONN_PARAM_UPDATE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jan 2015 06:44:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4866/what-s-the-actual-connection-interval-used" /><item><title>RE: What's the actual connection interval used?</title><link>https://devzone.nordicsemi.com/thread/17195?ContentTypeID=1</link><pubDate>Wed, 14 Jan 2015 06:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95e1bcf9-1dac-4ed9-90cb-2fcf89546ec0</guid><dc:creator>Ericat</dc:creator><description>&lt;p&gt;In static void on_ble_evt(ble_evt_t * p_ble_evt),
use p_ble_evt-&amp;gt;evt.gap_evt.params.connected.conn_params.max_conn_interval to get the actual connection interval in BLE_GAP_EVT_CONNECTED.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the actual connection interval used?</title><link>https://devzone.nordicsemi.com/thread/17194?ContentTypeID=1</link><pubDate>Fri, 19 Dec 2014 12:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfc71181-b351-45ab-9cc6-4c77bc34631d</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;As an introduction to how the connection parameter update procedure works, look at &lt;a href="https://devzone.nordicsemi.com/question/12545/update-connection-parameter-programmatically/"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Peripheral Preferred Connection Parameters (ppcp) contains e.g. the  MIN_CONN_INTERVAL and MAX_CONN_INTERVAL values which is set into the GAP service with call to function &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.1.0/s110/html/a01049.html#ga8c6db7d9bc501929c9cc63b4b04fdfbb"&gt;sd_ble_gap_ppcp_set()&lt;/a&gt;. If you read that with sd_ble_gap_ppcp_get() you will only get the same preferred peripheral values again, but not the actual connection parameters chosen by the central. If you use the Master Control Panel to connect to the device and discover services, you will see the values that you set with sd_ble_gap_ppcp_set() in a characteristic with name SlavePreferredConnectionParameters&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-Master-Control-Panel-showing-PPCP.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Try e.g. the ble_app_template example. Start the application in the debugger and set a breakpoint as shown below&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/apture-_2D00_-connection-parameter-values-extracted-from-debugger.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Then if you connect with the Master Control Panel, discover services and enable services, then you will see five seconds later that execution stops at the breakpoint. If you then watch &amp;quot;m_current_connection_params&amp;quot; variable, then you can see that both min and max values are 0x0190, which is 400 decimal which is equal to 500ms since the connection interval is represented in 1.25ms steps. In the ble_app_template example MIN_CONN_INTERVAL = 500ms and MAX_CONN_INTERVAL = 1000ms, so in this case, Master Control Panel has chosen 500ms connection interval.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>