<?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>Inquiry regarding CONN_SUP_TIMEOUT and SLAVE_LATENCY settings</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103540/inquiry-regarding-conn_sup_timeout-and-slave_latency-settings</link><description>hello, 
 I am modifying the basic code below to reduce battery consumption. 
 
 [original] 
 
 
 
 * modify 
 - To reduce battery consumption due to dummy data transmission, MIN_CONN_INTERVAL = 400 / MAX_CONN_INTERVAL = 500. - To reduce battery consumption</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Sep 2023 13:02:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103540/inquiry-regarding-conn_sup_timeout-and-slave_latency-settings" /><item><title>RE: Inquiry regarding CONN_SUP_TIMEOUT and SLAVE_LATENCY settings</title><link>https://devzone.nordicsemi.com/thread/444937?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 13:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d3a2b1c-9638-4ee2-b66a-6af0636a82b9</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Q1) With the above settings, TIMEOUT normally occurs at 10s... Are there any other problems that may occur due to the settings?[/quote]
&lt;p&gt;Please note that as a peripheral you cannot decide what parameters you get, because the central decides what parameters you end up with. For instance Apple has a document named &lt;a href="https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf"&gt;Accessory Design Guidelines for Apple Products&lt;/a&gt; (which you find under Accessories on &lt;a href="https://developer.apple.com/bluetooth/"&gt;https://developer.apple.com/bluetooth/&lt;/a&gt;), where recommendations for connection parameters are found in section &lt;em&gt;41.6 Connection Parameters&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The effect of longer supervision timeout and higher slave latency is that the peripheral can wait longer between connection events, since a number of connection events equal to slave latency can be skipped - making the effective longest interval equal ((slave_latency + 1) * connection_interval). The Bluetooth Core specification increases the supervision timeout to double this value, plus a factor of headroom depending on the accuracy of the clocks of the devices. Most likely the factor 2 is to allow for one failed connection event without the connection getting lost - since it is possible to recover on the next attempt. Note that depending on clock accuracy of both the peripheral and central, longer interval means the peripheral must wake up earlier to guarantee it will not miss the connection event, which may offset some of the power savings.&lt;/p&gt;
&lt;p&gt;The same effects come from longer connection intervals.&lt;/p&gt;
&lt;p&gt;I recommend testing various settings using our &lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;Online Power Profiler for Bluetooth LE&lt;/a&gt;. Set the role to &amp;quot;Connection (peripheral)&amp;quot;, TX and RX size per connection avent, and sleep clock (lfclock) accuracy settings for master and slave. Then play around with different connection settings to see the effect.&lt;/p&gt;
[quote user=""]&lt;p&gt;Q2) ((connSupervisionTimeout / (connIntervalMax * 2))-1) I found this formula while searching in devzone and applied it.&lt;/p&gt;
&lt;p&gt;According to the formula, as MAX_CONN_INTERVAL increases, SLAVE_LATENCY decreases.&lt;/p&gt;
&lt;p&gt;As MAX_CONN_INTERVAL gets smaller, SLAVE_LATENCY gets bigger.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which of MAX_CONN_INTERVAL and SLAVE_LATENCY is better in terms of battery consumption and safety?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;It looks like this formula is derived from the formulas in the Bluetooth core specification. For v5.4 of the specification, the restrictions on supervision timeout is found in Volume 6, Part B, section &lt;em&gt;4.5.2 Supervision timeout&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Please note that the formulation is that the supervision timeout must be at least that large. It is perfectly fine to decrease slave_latency without increasing max_conn_interval, and vice versa. The specification simply states:&lt;/p&gt;
&lt;p&gt;The connSupervisionTimeout shall be a multiple of 10 ms in the range 100 ms to 32.0 s and it shall be larger than&lt;br /&gt;(1 + connPeripheralLatency) × connSubrateFactor × connInterval × 2.&lt;/p&gt;
[quote user=""]Q3) Is the difference between MIN_CONN_INTERVAL = 400 / MAX_CONN_INTERVAL = 500 appropriate?[/quote]
&lt;p&gt;The difference seems fine, but you might want to set the min_conn_interval to a multiple of 15 ms (for best compatibility with Apple devices.) Further, please check the other recommendations from Apple.&lt;/p&gt;
&lt;p&gt;Unfortunately I did not find the recommendations for peripherals to be connected to Android devices.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>