How to measure latency in Bluetooth mesh? And questions about communication between a provisioner and node.

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? For example, can a node control the provisioner's LED while the provisioner maintains its own functionality?Is it possible to use a provisioner as a node in the mesh network?

Q2:

How to measure latency in Bluetooth mesh?(or Inter BLE node latency?)

 Is the "delay" here referring to the latency between two nodes?

 

 

Thanks in advance for your help!

Parents
  • Hi jom,

    Q1:

    Can data transmission still occur between a provisioner and node after provisioning is completed?

    Yes.

    For example, can a node control the provisioner's LED while the provisioner maintains its own functionality?

    Yes. In this example, the provisioner can have a Generic OnOff Server, and a node can control the provisioner's LED with the Generic OnOff Client.

    Is it possible to use a provisioner as a node in the mesh network?

    A provisioner can be a node, yes.


    Q2:

    How to measure latency in Bluetooth mesh?(or Inter BLE node latency?)

    You will need a way to do time sync between the nodes to measure latency.
    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.
    Large scale Bluetooth mesh testing 

     Is the "delay" here referring to the latency between two nodes?

    What sample are you testing here? It is most likely not the latency between two nodes, but the feature discussed in this DevZone thread:
    Delay parameter in Mesh 

    Hieu

Reply
  • Hi jom,

    Q1:

    Can data transmission still occur between a provisioner and node after provisioning is completed?

    Yes.

    For example, can a node control the provisioner's LED while the provisioner maintains its own functionality?

    Yes. In this example, the provisioner can have a Generic OnOff Server, and a node can control the provisioner's LED with the Generic OnOff Client.

    Is it possible to use a provisioner as a node in the mesh network?

    A provisioner can be a node, yes.


    Q2:

    How to measure latency in Bluetooth mesh?(or Inter BLE node latency?)

    You will need a way to do time sync between the nodes to measure latency.
    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.
    Large scale Bluetooth mesh testing 

     Is the "delay" here referring to the latency between two nodes?

    What sample are you testing here? It is most likely not the latency between two nodes, but the feature discussed in this DevZone thread:
    Delay parameter in Mesh 

    Hieu

Children
  • Thank you for your response, and I apologize for replying so late.

    For Q1,  I will give it a try later.

    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.

    I have been running the examples MESH and MESH-PROVISONER(nRF Connect SDK 2.1.2),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.

  • jom said:
    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.

    As I mentioned before, you need a way to sync time between the devices. Time syncing over Mesh is not precise enough for you to achieve meaningful latency measurement.

    The ethernet solution I described is only an example of that.

    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).

    A cruder example is a single wire connecting two devices. One device 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 compare them to calculate latency.

    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.

    For regular network, 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 rough idea of the delay. It cannot be precise, because there are other source of delay. Examples include, but are not limited to:

    • A random 0-10ms delay for each packet sending, required by spec to avoid collisions
    • A packet might not be successfully transmitted in the first attempt, but in a second or third. See CONFIG_BT_MESH_NETWORK_TRANSMIT_COUNT.
Related