This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Average connection latency for nRF52840

Hi, 

I'm trying to collect data for average latency for nRF52840 using an Android Smartphone as Central and nRF as peripheral.

Latency is being measured by the Android App developed. Latency in my application is defined as the period from when the Android App started scanning until it has successfully established a connection with the nRF. After the Android App discovered the address of the nRF, it will stop scanning and then tries to connect to it.

Prior connection, nRF is always advertising at 100ms advertising interval. I'm quite surprised that I get measurements with a very large variation. From min = 249ms to max = 9376ms with an average of 1672.17ms. Are these values expected? Or they are too long for the configured advertising interval which is 100ms?

Y axis : Latency in ms

X axis : Trials

Kind regards,

Erick

Parents
  • Hello,

    Prior connection, nRF is always advertising at 100ms advertising interval. I'm quite surprised that I get measurements with a very large variation. From min = 249ms to max = 9376ms with an average of 1672.17ms. Are these values expected? Or they are too long for the configured advertising interval which is 100ms?

    It is very hard to say, because it depends a lot on other factors than just the advertising interval. For example, are you testing in an environment with a lot of 2.4 GHz noise? Or perhaps without line-of-sight between the devices? 
    Do you know exactly how often the central is scanning?
    What is your central's scan interval and window? It could be that these do not match the advertising interval of the peripheral very well, which could cause these occasional latency spikes.

    If you are looking to minimize the latency in establishing a connection, you could also look into using directed fast advertising, on your peripheral device.

    Best regards,
    Karl

  • I am at an office space so I guess there is a good amount of noise in the area. The devices are only few inches apart, no more than 1 feet. The central is configured to have a 4.096s scan window and 4.096s scan interval so it would be scanning all the time to make sure it sees the advertisement of the nRF. Is this implementation correct? 

Reply Children
No Data
Related