<?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>Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66680/fixed-and-repeatable-latency-in-ble</link><description>Hi, 
 Our setup includes two devices, a central and peripheral. For both devices, nRF52840 is used. 
 We are working with nRF5 SDK version 16.0. 
 In our application, the central device sends a specific command , which needs to arrive in a fixed latency</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Oct 2020 13:46:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66680/fixed-and-repeatable-latency-in-ble" /><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/274058?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 13:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9528c239-0164-4b39-abd8-596f7873ea97</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="90692" url="~/f/nordic-q-a/66680/fixed-and-repeatable-latency-in-ble/273689#273689"]Does &lt;span&gt;BLE_EVT_TX_COMPLETE event&amp;nbsp;mean that the user packet was transmitted successfully and was&amp;nbsp;&lt;strong&gt;acknowledged&lt;/strong&gt; in the link layer?&lt;/span&gt;[/quote]
&lt;p&gt;Yes, that is correct.&amp;nbsp;&lt;/p&gt;
[quote userid="90692" url="~/f/nordic-q-a/66680/fixed-and-repeatable-latency-in-ble/273689#273689"]&lt;p&gt;&lt;span&gt;Is there a way to know whether retransmission has accrued per a specific user packet?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;No. That information is not forwarded to the application layer.&lt;/p&gt;
[quote userid="90692" url="~/f/nordic-q-a/66680/fixed-and-repeatable-latency-in-ble/273689#273689"]Subsequently, can a specific packet be sent without the need for receiving link-layer acknowledge&amp;nbsp;- so&amp;nbsp;auto-retransmissions are avoided?&amp;nbsp;[/quote]
&lt;p&gt;No.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/273689?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2020 10:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:257caa12-6dcb-411b-aee1-221400f2a40a</guid><dc:creator>ThePinkPanther</dc:creator><description>&lt;p&gt;Does &lt;span&gt;BLE_EVT_TX_COMPLETE event&amp;nbsp;mean that the user packet was transmitted successfully and was&amp;nbsp;&lt;strong&gt;acknowledged&lt;/strong&gt; in the link layer?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there a way to know whether retransmission has accrued per a specific user packet?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Subsequently, can a specific packet be sent without the need for receiving link-layer acknowledge&amp;nbsp;- so&amp;nbsp;auto-retransmissions are avoided?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/273565?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 15:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f725a9d5-d555-4ea8-a6ce-1b8b650e804f</guid><dc:creator>Sigurd</dc:creator><description>[quote user="ThePinkPanther"]Does the receive path have a similar latency variance, from the moment the packet is received fully in the radio part, and till the SoC user application layer gets the data?[/quote]
&lt;p&gt;&amp;nbsp;No, it&amp;#39;s much faster.&amp;nbsp;The event, a&amp;nbsp;BLE_GATTS_EVT_WRITE in this case, is forwarded to the application layer through a software interrupt. If the CPU is not busy with other interrupts(UART,SPI,etc), then it will be very fast. There are&amp;nbsp;some numbers on how much time the SoftDevice uses to process the package here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fble_processor_avail_interrupt_latency%2Fble_central_connection_performance.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fble_processor_avail_interrupt_latency%2Fble_central_connection_performance.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/273324?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 20:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c70e0b-5feb-4230-b19f-8ac3c33fc4e3</guid><dc:creator>ThePinkPanther</dc:creator><description>&lt;p&gt;This is very helpful - Thanks&lt;/p&gt;
&lt;p&gt;Does the receive path have a similar latency variance, from the moment the packet is received fully in the radio part, and till the SoC user application layer gets the data?&amp;nbsp; Or is it a deterministic and fixed latency?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/273302?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 15:45:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1df588a4-020b-43ea-8ef2-f6d04b0acce8</guid><dc:creator>Sigurd</dc:creator><description>[quote user="ThePinkPanther"]If I understand correctly, configuring both minimum and maximum connection intervals to 7.5ms, for example, will result in latency between 0 to 7.5ms - right?[/quote]
&lt;p&gt;Correct, assuming that the packet is send in the upcoming connection event(this is not guaranteed).&lt;/p&gt;
[quote user="ThePinkPanther"]Is there a way to measure the time&amp;nbsp;a specific packet is &lt;span&gt;queued by the SoftDevice,&amp;nbsp;till it is actually sent?&lt;/span&gt;[/quote]
&lt;p&gt;You can measure the time from you call &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fgroup___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga90298b8dcd8bbe7bbe69d362d1133378"&gt;sd_ble_gattc_write&lt;/a&gt;&lt;span&gt;(), until you get the event&amp;nbsp;&lt;/span&gt;BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/273093?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 07:40:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d75f1ca-404f-43b2-86c5-165ef6562aa6</guid><dc:creator>ThePinkPanther</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I understand correctly, configuring both minimum and maximum connection intervals to 7.5ms, for example, will result in latency between 0 to 7.5ms - right?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there a way to measure the time&amp;nbsp;a specific packet is &lt;span&gt;queued by the SoftDevice,&amp;nbsp;till it is actually sent?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed and repeatable latency in BLE</title><link>https://devzone.nordicsemi.com/thread/273033?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 15:22:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b611807b-1244-47a9-bad6-bf59e3f01111</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When you send data from your application code, it will be queued by the SoftDevice, and then (usually) sent in the next connection event. A new connection event happens every connection interval. This means that the time from when you queue the packet on the central-side, until it will be received by the peer depends on the time the packet was queued in relation to when the next connection event starts.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;N&lt;/span&gt;&lt;span&gt;ote that even if you are only sending a single command with 20 byte payload, it&amp;rsquo;s not 100% guaranteed to be received by the peer in the next connection event. Due to interference, packets can be lost, and would need to be resent in the next connection event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Also note that if you are sending a lot of data, and depending on e.g. how the GAP event length is configured, what connection interval is used, etc, you might not be able to send all the data in the next connection event, and you might need several connection events to send all the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>