<?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 interval for nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116274/connection-interval-for-nrf52840</link><description>Hi , 
 For Battery operated devices, we are using NRF52840, and developing the firmware using Segger Embedded studio + NRF SDK. s140nrf52720, nRF5SDK1702d674dde 
 For our application we are using the &amp;quot;Peripheral - Nordic UART Service NUS&amp;quot; example to send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Dec 2024 12:13:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116274/connection-interval-for-nrf52840" /><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/514495?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 12:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fdcc138-a9ce-4317-a80a-9526c36693fa</guid><dc:creator>AkshayN17</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I capture the s&lt;span&gt;niffer log and share here for review.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for suggestion.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/512694?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 09:07:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbe65212-91a8-4e5f-8264-15f41ef399a5</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Ah, okay. Then AFAIK that should work fine, but then it&amp;#39;s most likely a mismatch in the connection parameter update is my guess, and that either the peripheral or central is opting for another slave latency/connection interval.&lt;/p&gt;
&lt;p&gt;It would be helpful to see either the logging information printing what the outcome of the connection parameter update is or the actual on-air sniffer log. You can get a sniffer log with Wireshark, a spare nRF52 series DK, and the &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer firmware&lt;/a&gt; programmed onto it. I think a sniffer log would be the best next step to take here so we can see what&amp;#39;s going on over the air exactly, and why the connection events only go up to ~10 seconds on your end.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/512493?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 05:14:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cea39b42-13be-47f9-bcad-8ee54c7d7562</guid><dc:creator>AkshayN17</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Agree that maximum connection interval is 4 seconds as per BLE specs. However, I am trying to use the slave latency to increase the connection time interval.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/512281?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2024 09:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c25a282-d95a-460f-8cae-e0ab80e41390</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;So, the maximum allowed connection intervals set in the BLE specification is 4 seconds. Increasing the connection intervals anything above this should not be done, and is likely to cause errors + being out of the Bluetooth specification.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/512045?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 08:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81206d13-b90b-4d45-933d-adaca63fe63f</guid><dc:creator>AkshayN17</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;Second issue is solved, by changing the connection parameter update functions&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ble_conn_params_stop();&lt;br /&gt; sd_ble_gap_ppcp_set(&amp;amp;params);&lt;br /&gt; // err_code = sd_ble_gap_conn_param_update(p_evt-&amp;gt;conn_handle, &amp;amp;params);&lt;br /&gt; ble_conn_params_change_conn_params(p_evt-&amp;gt;conn_handle, &amp;amp;params);&lt;/p&gt;
&lt;p&gt;However, first issue is still there. Not able to change the connection interval to &amp;gt;10.5Sec.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/511765?ContentTypeID=1</link><pubDate>Sat, 23 Nov 2024 12:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6071c462-8182-4b2a-8337-5ecfc5bac2ff</guid><dc:creator>AkshayN17</dc:creator><description>&lt;p&gt;Hi Simnor,&lt;/p&gt;
&lt;p&gt;The post you shared is really helpful.&lt;/p&gt;
&lt;p&gt;Okay, noted with BLE we can not go beyond 15sec of connection interval.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I kept the parameters same as mentioned in the post for 15 sec connection interval,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;MIN_CONN_INTERVAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSEC_TO_UNITS(800, UNIT_1_25_MS)&lt;/li&gt;
&lt;li&gt;MAX_CONN_INTERVAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSEC_TO_UNITS(830, UNIT_1_25_MS)&lt;/li&gt;
&lt;li&gt;SLAVE_LATENCY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&lt;/li&gt;
&lt;li&gt;CONN_SUP_TIMEOUT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSEC_TO_UNITS(32000, UNIT_10_MS)&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="padding-left:30px;"&gt;However, with this my effective connection interval &lt;strong&gt;is just 10.5 Sec and not close to 15sec&lt;/strong&gt;. We tried different options but no luck.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Any idea why it is happening ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second poin&lt;/strong&gt;t, I want to change the connection interval from the mobile APP, for this I am sending the new connection interval value from the UART RX characteristic to peripheral. On receiving the value in&amp;nbsp;&lt;strong&gt;nus_data_handler&lt;/strong&gt;(ble_nus_evt_t * p_evt), I am changing the default connection parameters to some fixed value as shown in image.&lt;/p&gt;
&lt;p&gt;New values are taking place and connection interval is changing to 7.5Sec. bu&lt;strong&gt;t after almost 1 min&amp;nbsp;connection interval is again changing to default value in my code i.e. 1 sec.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;Whats wrong , I am doing and because of that values are changing to default after 1 min?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;PS: Fixed values are just for testing, plan is to change the slave latency as per connection interval value sent from the mobile app, keeping the max connection interval to 1sec only. so effective connection interval will be change.&lt;/p&gt;
&lt;p&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/pastedimage1732364747954v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/511471?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 11:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb1c9fd-5d82-45ae-bfd5-7e1a9faf79cd</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;HI&lt;/p&gt;
&lt;p&gt;Sorry, but an error 7 in this function points to an invalid parameters being set in your gap_params_init().&amp;nbsp;I think this is because of your supervision timeout + the latency set together increasing the supervision timeout above the allowed 32 seconds set by the Bluetooth specification. Check out the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67801/gap_params_init-and-connection-parameter-issue/277838"&gt;DevZone thread here&lt;/a&gt; where my colleague Edvin explains a similar issue another user was running into.&lt;/p&gt;
&lt;p&gt;It could also be the connection intervals being set too high.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/511270?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2024 11:48:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75b84c60-ab45-48fd-b4e4-d15defc8ab1c</guid><dc:creator>AkshayN17</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The the error is while initializing the GAP parameters.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is working fine till 12 sec of connection interval. (&amp;nbsp;MAX_CONN_INTERVAL:2000ms,SLAVE_LATENCY 6.&amp;nbsp;CONN_SUP_TIMEOUT: 32000ms).&lt;/p&gt;
&lt;p&gt;But failing for below combination&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:334px;max-width:334px;" alt=" " height="334" src="https://devzone.nordicsemi.com/resized-image/__size/668x668/__key/communityserver-discussions-components-files/4/pastedimage1732103247877v2.png" width="334" /&gt;&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/pastedimage1732103303311v3.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/510122?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 13:58:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4272aa8d-4e7c-4483-932f-f9fafb046092</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please try finding out what function it is that returns this error code. Error code 7 generally points to an operation timing out, so something in your application seems to be timing out in between connections. Likely with a 10 second timeout then.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/510102?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 12:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7557781b-371b-4a8e-804d-7efacd517f1e</guid><dc:creator>AkshayN17</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;Thank you for the reply...!&lt;/p&gt;
&lt;p&gt;We have used the same Post as you shared for the current consumption minimization. We will go through the post shared by you&amp;nbsp; -&amp;nbsp; PunchThrough.&lt;/p&gt;
&lt;p&gt;For second part of the issue #1, we know that MIN_CONN_INTERVAL and MAX these parameters control the connection interval. But problem is we are not able to adjust the connection parameter interval greater than 10sec,( using MAX CONN INTERVAL and Slave latency), Ideally we should be able to achieve it to 32Sec. However, when we change the these parameters to others than this then there is error in the code while initializing the connection parameter.&lt;/p&gt;
&lt;p&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/pastedimage1731415048327v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection interval for nrf52840</title><link>https://devzone.nordicsemi.com/thread/510068?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 10:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c811c432-3c6f-4602-8e03-e4afa91306b7</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If you want a very large connection interval I think it would be better for current consumption reasons to disconnect and put the devices into sleep mode for a set amount of time and reconnect instead.&amp;nbsp;Check out the &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf52-designs"&gt;current consumption guide available here &lt;/a&gt;for how to put the device into low power mode.&lt;/p&gt;
&lt;p&gt;You can check out this guide on how to manage your Bluetooth connections here:&amp;nbsp;&lt;a href="https://punchthrough.com/manage-ble-connection/"&gt;https://punchthrough.com/manage-ble-connection/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding your Issue #2: The peripheral example projects also have these MIN_CONN_INTERVAL and&amp;nbsp;MAX_CONN_INTERVAL parameters that can be set higher to let the peripheral accept higher connection parameters than 75ms.&lt;/p&gt;
&lt;p&gt;When connected in the nRF Connect for Android mobile app you can change the connection parameters somewhat, but not fully. After connecting, you can press the three dots in the connection window and request &amp;quot;connection priority&amp;quot; either, HIGH, BALANCED or LOW ranging from &lt;strong&gt;15 to 125ms&lt;/strong&gt; connection intervals. Higher than that is not supported in the nRF Connect for Mobile app at least.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>