<?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>Keep fast connection interval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15006/keep-fast-connection-interval</link><description>Hi,I want to ble stay in fast connection interval after connection succeed. So I set the connection parameters like that: 
 #define DEFAULT_DESIRED_MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS)
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL MSEC_TO_UNITS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jul 2016 09:26:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15006/keep-fast-connection-interval" /><item><title>RE: Keep fast connection interval</title><link>https://devzone.nordicsemi.com/thread/57257?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2016 09:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa10bc25-cd0b-43c7-94c7-807a1387206f</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is not quite clear what you mean by &amp;quot;I used the android phone to test the speed, and I find out it takes 500 ms when app received a packet.&amp;quot; If it includes connection setup it is clear that it would take much longer than a single connection interval. Also, if there is a lot of data to be transferred it would take several BLE packets and several connection events. You must also account for the handling of BLE packets by the BLE stack on the Android, and delays on the Android system and in the Android APIs before the contents is displayed in the Android app. In addition you may have packet losses which leads to retransmits.&lt;/p&gt;
&lt;p&gt;I will update this answer if you can explain the following clearly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What methods are you using for data transfer? (notifications? advertising packets? other? Describe as much as possible regarding your setup.)&lt;/li&gt;
&lt;li&gt;How do you measure the 500 ms delay?&lt;/li&gt;
&lt;li&gt;What exactly are you measuring, i.e. what defines the starting point and stopping point for measuring the delay?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that even though the pheripheral has preferred connection parameters it is up to the central to decide. This means there is no guarantee you will actually get the connection parameters you ask for. However, most likely the connection parameters are in or close to the range you have specified, so it would not account for delays of 500 ms. To check the actual connection parameters you can do one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can use the &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer"&gt;nRF sniffer&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/14950/using-wireshark-to-see-the-connection-interval/"&gt;Wireshark to see the connection interval&lt;/a&gt;. (Any other BLE sniffer would also do, of course.)&lt;/li&gt;
&lt;li&gt;If you have UART or RTT output you can print the parameters. If you use our SDK you will get the connection parameters on the &lt;code&gt;BLE_GAP_EVT_CONNECTED&lt;/code&gt; event (&lt;code&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.connected.conn_params&lt;/code&gt;) and on the &lt;code&gt;BLE_GAP_EVT_CONN_PARAMS_UPDATE&lt;/code&gt; event (&lt;code&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.conn_param_update.conn_params&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>