<?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>Effect of Slave Latency</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27263/effect-of-slave-latency</link><description>This question is similar to this thread:
 devzone.nordicsemi.com/.../ 
However it was framed differently and didn&amp;#39;t really clear anything up for me. 
 Say my application requires a slave to send very low latency, potentially very infrequent messages</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Nov 2017 15:53:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27263/effect-of-slave-latency" /><item><title>RE: Effect of Slave Latency</title><link>https://devzone.nordicsemi.com/thread/107641?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 15:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:637249c8-8b7e-4bcb-af1d-74f7aecbf7d4</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well more or less, it&amp;#39;s just symmetrical from both sides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If Master or Slave enters into inactive mode because it executes Master/Slave Latency as per connection parameters (= it has nothing to send and nothing is being transferred in) then it&amp;#39;s more or less equal to loss of packets. The opposite side either repeats the packet (if it is Master) or listens (if it is Slave) until Link Layer continues in PDU exchange or until Supervision Timeouts expires.&lt;/li&gt;
&lt;li&gt;Once Supervision Timeout expires (regardless if Latency was executed by any side or not) then controller should disconnect immediately and go back to initial GAP state (Observer/Broadcaster/Inactive).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However if both sides are able to keep clock drift under control for longer time you can play with Supervision Timeout and have &amp;quot;gaps&amp;quot; in communication (= save power) up to 32s (if I recall specificaiton correctly).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Effect of Slave Latency</title><link>https://devzone.nordicsemi.com/thread/107642?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 14:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:244b1ebc-e48e-4845-a23f-8e4eeb8c12ba</guid><dc:creator>Paddy</dc:creator><description>&lt;p&gt;Thanks for your reply, just to clarify:&lt;/p&gt;
&lt;p&gt;From the perspective of the master, there is no change in behaviour between the expiry of Slave Latency and Supervision Timeout.&lt;/p&gt;
&lt;p&gt;From the perspective of the slave, the time between the two should be spent attempting to receive a master transmission by listening for transmissions (on multiple channels if necessary).&lt;/p&gt;
&lt;p&gt;So it would be technically possible to have a slave sleep for 30s at a time (by not immediately attempting to receive after Slave Latency expires) without losing the connection, it&amp;#39;s just very unlikely to be achieved due to drift in the clock.&lt;/p&gt;
&lt;p&gt;Is my understanding correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Effect of Slave Latency</title><link>https://devzone.nordicsemi.com/thread/107640?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2017 17:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2581f2dd-b1de-4b5b-a148-bb73e567ab8c</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;It&amp;#39;s clearly written in the BT SIG spec:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unless Master applies Master Latency it must broadcast each interval.&lt;/li&gt;
&lt;li&gt;If there is Slave Latency &amp;gt; 0 agreed on the link the Slave can avoid reply (= so it can also avoid listening and save interesting amount of power) if it has nothing to do.&lt;/li&gt;
&lt;li&gt;If Slave has something to do it can indeed wake sooner then after entire Slave Latency period. So your requirement for low latency (when Slave has something to say) isn&amp;#39;t in contradiction with using Slave Latency.&lt;/li&gt;
&lt;li&gt;However if you also require low latency from Master side then you cannot set Slave Latency to higher value because then it would be possible that Slave goes to sleep and Master has something to day in next interval but must wait until Slave starts to listen again.&lt;/li&gt;
&lt;li&gt;Drawback of Slave Latency is that your Slave must have good clock source. Normally BLE kind-of calibrates itself by counting all timers from very last radio event. Once you miss lot of events you are in danger that drift of both clocks (on Master and Slave) will be so big that they won&amp;#39;t meet once the Slave Latency is over (everything on BLE is driven by timers and all Tx/Rx events are limited to few milliseconds or rather microseconds in certain cases).&lt;/li&gt;
&lt;li&gt;Finally overall connection link is guarded by Supervision timout on both sides. So until it expires (= no PDU from other side since last correct PDU exchange) he device can and should try to hit every connection interval. In case that Slave goes back from Slave Latency sleep window and it doesn&amp;#39;t receive PDU from Master on expected channel in expected time it should move to next channel and time in sequence and try it again. So if it&amp;#39;s normal interference-based packet loss it should be recovered. If the devices are out of range or clocks drifted too far so they don&amp;#39;t exercise Tx/Rw windows on same channels at the same time then connection will break due to Supervision Timeout.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So practically for your example: setting 7.5ms connection interval, Slave Latency 500ms and Supervision Timeout in 2-32s makes perfect sense (if you are fine that during activity time Slave will broadcast very often and that Master will do Tx/Rx every 7.5ms = relatively high power demand).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>