<?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>How to measure latency in Bluetooth mesh? And questions about communication between a provisioner and node.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98893/how-to-measure-latency-in-bluetooth-mesh-and-questions-about-communication-between-a-provisioner-and-node</link><description>Hi, all. 
 Q1: 
 I have three nRF52840 boards and have been running the examples MESH and MESH-PROVISONER( nRF Connect SDK 2.1.2 ).One provisioner and two nodes.Can data transmission still occur between a provisioner and node after provisioning is completed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 May 2023 15:18:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98893/how-to-measure-latency-in-bluetooth-mesh-and-questions-about-communication-between-a-provisioner-and-node" /><item><title>RE: How to measure latency in Bluetooth mesh? And questions about communication between a provisioner and node.</title><link>https://devzone.nordicsemi.com/thread/428531?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 15:18:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02b0ba23-1515-4adb-b966-cc990b93c276</guid><dc:creator>Hieu</dc:creator><description>[quote user="jom"]For Q2, I would like to ask if there are other methods besides using Ethernet to measure latency. My development board does not have an Ethernet interface.[/quote]
&lt;p&gt;As I mentioned before, you need a way to sync time between the devices. Time syncing over Mesh is not&amp;nbsp;precise enough for you to achieve meaningful latency measurement.&lt;/p&gt;
&lt;p&gt;The ethernet solution I described is only an example of that.&lt;/p&gt;
&lt;p&gt;The best way is to have a physical wired connection between two nodes under measurement with a time source (one of the two nodes can also work as the time source).&lt;/p&gt;
&lt;p&gt;A cruder example is a single wire connecting two devices. One device&amp;nbsp;set the signal on that wire. The moment that the signal is set is considered time 0 on both devices. After that, you log the timestamps of events, and&amp;nbsp;compare them to calculate latency.&lt;/p&gt;
&lt;p&gt;As you can see, there are many ways to go about it. It really is up to your physical capabilities. However, note that they are all to measure latency in experimental/development use cases.&lt;/p&gt;
&lt;p&gt;For regular network,&amp;nbsp;I figure you can monitor the TTL of received packets. That would indicate how many hops that the packet had to jump through and give you a&amp;nbsp;&lt;em&gt;rough&lt;/em&gt; idea of the delay. It cannot be precise, because there are other source of delay. Examples &lt;em&gt;include, but are not limited to&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A random 0-10ms delay for each packet sending, required by spec to avoid collisions&lt;/li&gt;
&lt;li&gt;A packet might not be successfully transmitted in the first attempt, but in a second or third. See&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_MESH_NETWORK_TRANSMIT_COUNT"&gt;CONFIG_BT_MESH_NETWORK_TRANSMIT_COUNT&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to measure latency in Bluetooth mesh? And questions about communication between a provisioner and node.</title><link>https://devzone.nordicsemi.com/thread/428311?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 06:14:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50965d40-3416-462c-b0e0-96ee2618e7ee</guid><dc:creator>jom</dc:creator><description>&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Thank you for your response, and I apologize for replying so late.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;For Q1,&amp;nbsp; I will give it a try later.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;For Q2, I would like to ask if there are other methods besides using Ethernet to measure latency. My development board does not have an Ethernet interface.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span&gt;I have been running the examples MESH and MESH-PROVISONER(&lt;/span&gt;&lt;span&gt;nRF Connect SDK 2.1.2&lt;/span&gt;&lt;span&gt;)，I would like to add functionality to this mesh network that can detect latency and packet loss.Can you provide some specific suggestions? Thank you very much for your help.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to measure latency in Bluetooth mesh? And questions about communication between a provisioner and node.</title><link>https://devzone.nordicsemi.com/thread/421429?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 09:29:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:465a8eb0-b9a0-4783-b827-a3f78263d92f</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi jom,&lt;/p&gt;
&lt;p&gt;Q1:&lt;/p&gt;
[quote user=""]Can data transmission still occur between a provisioner and node after provisioning is completed?[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote user=""]For example, can a node control the provisioner&amp;#39;s LED while the provisioner maintains its own functionality?[/quote]
&lt;p&gt;Yes. In this example, the provisioner can have a Generic OnOff Server, and a node can control the provisioner&amp;#39;s LED with the Generic OnOff Client.&lt;/p&gt;
[quote user=""]Is it possible to use a provisioner as a node in the mesh network？[/quote]
&lt;p&gt;A provisioner can be a node, yes.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Q2:&lt;/p&gt;
[quote user=""]How to measure latency in Bluetooth mesh？（or Inter BLE&amp;nbsp;node latency？）[/quote]
&lt;p&gt;You will need a way to do time sync between the nodes to measure latency.&lt;br /&gt;For example, in the experiment described in the following link, an Ethernet link between nodes is used to do time sync, and based on that, latency is measured.&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/large-scale-bluetooth-mesh-testing"&gt;Large scale Bluetooth mesh testing&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;img style="max-height:240px;max-width:320px;cursor:zoom-in;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1031.pastedimage1681897547695v1.png" alt=" " /&gt;Is the &amp;quot;delay&amp;quot; here referring to the latency between two nodes？[/quote]
&lt;p&gt;What sample are you testing here? It is most likely not the latency between two nodes, but the feature discussed in this DevZone thread:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/35077/delay-parameter-in-mesh"&gt;Delay parameter in Mesh&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>