<?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>Bluetooth disconnects after being connected for 18 hours</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77320/bluetooth-disconnects-after-being-connected-for-18-hours</link><description>Hello, 
 I am working with nrf5281 and its bluetooth connection, the connection is established well and the chip and the nrf connect application stay connected, however the connection is lost after about 18 hours or so, what I want to achieve is to keep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jul 2021 16:32:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77320/bluetooth-disconnects-after-being-connected-for-18-hours" /><item><title>RE: Bluetooth disconnects after being connected for 18 hours</title><link>https://devzone.nordicsemi.com/thread/320100?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 16:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fbf0b05-9956-48f3-a80c-db77d11e450c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello José,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this. The summer holidays have begun here in Norway, and DevZone is therefore operating with reduced staff for the time being. Sorry for any inconvenience this might cause.&lt;/p&gt;
[quote user="joshu2991"]I have seen the error in the nrf connect log[/quote]
&lt;p&gt;The&amp;nbsp;&lt;span&gt;Error 22 (0x16): GATT CONN TERMINATE LOCAL HOST means that the central (phone) has terminated the connection.&lt;br /&gt;It seems to me that the message prior to the error contains an acl_disconnect action.&lt;br /&gt;Could you provide me the entire log, in text - not a screenshot - from when this happens?&lt;br /&gt;It could also be beneficial to see &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le#:~:text=nRF%20Sniffer%20for%20Bluetooth%20LE%20is%20a%20useful%20tool%20for,what%20is%20happening%20on%2Dair."&gt;a sniffer trace&lt;/a&gt;&amp;nbsp;of the communication happening right before this disconnect occurs.&lt;/span&gt;&lt;/p&gt;
[quote user="joshu2991"]Honestly I have not been able to find the parameters that allow a connection for at least a week, and in all the posts I have found none of them explain this. Could you help me to know what values I should use? Thank You![/quote]
&lt;p&gt;The connection parameters will either be accepted, or rejected. In the case that they are rejected, the connection will be terminated from the side that rejected the parameters. Since the central is the one that actually decides which parameters is used, a disconnect for this reason is likeliest to be initiated from the peripheral side of the link. In your log, it seems that it is the central that initiated the disconnect, and therefore I do not think that the connection parameters are what is causing this. I think we should look more into what is happening in the log and/or sniffer trace prior to the disconnect, to understand what is happening here.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth disconnects after being connected for 18 hours</title><link>https://devzone.nordicsemi.com/thread/320082?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 14:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2507adb8-9356-4909-b67b-68a9a2b5ef55</guid><dc:creator>joshu2991</dc:creator><description>&lt;p&gt;Can someone help me please?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth disconnects after being connected for 18 hours</title><link>https://devzone.nordicsemi.com/thread/319491?ContentTypeID=1</link><pubDate>Sun, 11 Jul 2021 17:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5936e9a0-bb9e-485b-a4b3-d3b3841839aa</guid><dc:creator>joshu2991</dc:creator><description>&lt;p&gt;I have made four tests during the weekend based on the information in the following links and more:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/25225/get-the-min-connection-interval-with-8-sensors/99397#99397"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/25225/get-the-min-connection-interval-with-8-sensors/99397#99397&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/26592/bluetooth-connection-parameters/104597#104597"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/26592/bluetooth-connection-parameters/104597#104597&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34425/what-is-the-min-send-interval-over-ble"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/34425/what-is-the-min-send-interval-over-ble&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30644/current-optimisation-in-terms-of-conn-interval-and-slave-latency"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/30644/current-optimisation-in-terms-of-conn-interval-and-slave-latency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17481/nrf-sleep-without-losing-connection-power-efficiency"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/17481/nrf-sleep-without-losing-connection-power-efficiency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I used different parameters for maximum and minimum intervals (leaving conn_sup_timeout=6000) and the connection duration in each test was as follows:&lt;/p&gt;
&lt;p&gt;Min=200 Max=4000&amp;nbsp; &amp;nbsp;-&amp;gt;&amp;nbsp; &amp;nbsp;connection time=2 min 35 seg&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Min=500 Max=2850&amp;nbsp; &amp;nbsp;-&amp;gt;&amp;nbsp; &amp;nbsp;connection time=18 hrs 14 min 08 seg&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Min=500 Max=1000&amp;nbsp; &amp;nbsp;-&amp;gt;&amp;nbsp; &amp;nbsp;connection time=9 hrs&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Min=10 Max=20&amp;nbsp; &amp;nbsp;-&amp;gt;&amp;nbsp; &amp;nbsp;connection time=18 hrs 12 min 12 seg&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Honestly I have not been able to find the parameters that allow a connection for at least a week, and in all the posts I have found none of them explain this. Could you help me to know what values I should use? Thank You!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth disconnects after being connected for 18 hours</title><link>https://devzone.nordicsemi.com/thread/319461?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 23:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:085fc40e-3c77-49ad-9fe5-49808d7fa9a2</guid><dc:creator>joshu2991</dc:creator><description>&lt;p&gt;I have done several tests and I realized that the disconnection happens because of the MIN and MAX CONN INTERVAL values, currently 100 and 200. I would like to ask, in order to maintain the connection for several days or weeks, what would be the best values to achieve this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth disconnects after being connected for 18 hours</title><link>https://devzone.nordicsemi.com/thread/319454?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 18:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cec2068-a600-49dc-88bf-9780a99ce59e</guid><dc:creator>joshu2991</dc:creator><description>&lt;p&gt;I have seen the error in the nrf connect log, however I have searched the forum for a solution but so far I have not been able to find it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0451.jpeg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>