Performance Issues with BLE Mesh Data Collection to Android App

We have developed a system that is comprised on a BLE mesh peripheral sensor, and multiple mesh node sensors. The peripheral node connects to an Android app to configure, control and use the data from the sensors over a NUS connection. With 3 devices the data collection performance is not great (2-3 seconds to get data changes) and with 5 it is substantially worse (20 seconds to get data changes). Looking for suggestions on where to focus our attention to find the bottleneck in this system.  We are using nRF Connect SDK v2.3.

  • Hi,

    I do have a couple of thoughts about where such a setup could have bottlenecks, but 20 seconds delay for 5 devices is far above what I would expect.

    Each mesh node has a limitation of max 100 network packets sent per 10 second sliding interval. What this means in practice is you can send 10 network packets per second over time, or a burst of 100 packets, then wait until 10 seconds passed after beginning that burst before sending new packets.

    A mesh message may need one or several network packets, depending on the message size, with 11 bytes payload being the maximum for a single network packet. This means, with the above limitation of number of network packets, if your gateway node sends long packets you may struggle with your throughput. Further, if you try to send more data than what you have throughput for, buffers will start to fill, adding latency. If you have throughput issues for outbound packets/messages, you will see that latency steadily increases over time. At some point, new packets will not have space in the buffer. You then start to experience packet loss, and constant latency.

    Another source of latency could be the translation between mesh packets and NUS, do you have buffers there filling up or otherwise causing delays?

    Finally the configuration of the nodes and models on the nodes, may affect network performance. What are the publish retransmit, network retransmit, relay retransmit, and intervals for those, configured for the nodes/models?

    Regards,
    Terje

  • Hello Terje, Here are our settings: 

    publishTtl = MeshParserUtils.USE_DEFAULT_TTL (255)
    publicationSteps = 0
    publicationResolution = MeshParserUtils.RESOLUTION_100_MS
    retransmitCount = 1
    retransmitIntervalSteps = 1

    When retransmitCount is set to 1 the app always receives duplicate messages from every device which increases the messages during a short period of time. I was expecting this setting to mean that it will retransmit if needed but it seems to always retransmit. Can you explain this? The performance is better with retransmitCount set to 0 but I am concerned that messages could get lost. Do you have any other recommended changes in our settings?

  • Hi,

    I am very sorry for the delay, I was out-of-office for the past weeks.

    Most of the mechanisms for increased reliability in Bluetooth mesh are based on redundancy, and not on conditional mechanisms such as conditional retransmits. The trade-off then, is between higher level of redundancy (at the expense of spending more network resources) and less congested network (at the expense of lower redundancy.) For a given use case (and possibly also a given installation) you can tune the parameters for what you consider optimal for that particular use case (or installation).

    Have you gotten further in my absence, and for instance done some calculations on the required throughput, or on the number of originating packets from each device, or otherwise figured out more about where the bottlenecks are?

    Regards,
    Terje

Related