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

How to improve Social Distance scanning performance?

We are adding social distance feature to our existing product. We are facing performance issue. The device has one peripheral role and one observer role. I have set scanning interval to 100ms and scanning window to 50ms. Advertising interval set to 25ms. The situation is that, we are testing the scanning performance by resetting the device every time.

We scan to only our intended device. 

3 out of 5 times, the device is able to scan the intended device well. say 5 to 10 scanning occurrence of the intended device happened in every second.

but 2 out of 5 times, the scanning performance is not so good. It means, it is not able to scan the intended device well enough. the number of scanning occurrence of the intended device in these times are one or zero for every second. If we reset the intended device in this situation, then the number of scanning occurrence of the intended device is increased.

Even if we place the devices very close (5cm) to each other, the scanning performance result is same.

How we can improve the scanning performance all the times.

What is the best scanning interval, scanning window and advertising interval when the device is used to act in both advertiser and observer role.

Spec details used: nRF52832, SDK 15.2.0, S132 6.1.1

  • Hi Karl,

    Before answering to your questions, I should let you know one thing. Our application getting enough number of advertising reports including both intended and unintended devices for every seconds. But the scanning performance towards intended devices was not up to the mark some times. We just used power profile tool and it is showing the scanning interval and advertising interval as the power changes during RF activity. 

    Could you speak to how much better the performance?

    Before it was such that there was no scanning or one scanning reported per second for the intended devices until next power cycle. But now it is that in the same power cycle, after few seconds of zero or one advertising report it becomes normal, it means we are getting 3 to 10 reports.

    Could you elaborate on what you mean here, did you configure no timeout for the advertising duration, but you restart the advertising every second? What is your reason for doing this?

    I configured the advertising timeout to 1 sec. Advertising restarted after every timeout. Even if two device start the scanning same time, due to random delay added in advertising will make them to scan each other enough, right? As we faced performance issue I thought to restart advertising periodically with timeout. 

    Are you familiar with using the nRF Sniffer tool? It would be highly beneficial if you could send me a sniffer trace of the events in which the re-connection takes up to 3 seconds. This way, we can ensure that the peripheral is in fact advertising during this time.

    It is not about re-connection issue. I have used the sniffer before. I will try to take sniffer trace after few configuration tests.

    Regards,

    Jebakumar

  • Hello Jebakumar,

    Jebakumar said:
    Before answering to your questions, I should let you know one thing. Our application getting enough number of advertising reports including both intended and unintended devices for every seconds. But the scanning performance towards intended devices was not up to the mark some times. We just used power profile tool and it is showing the scanning interval and advertising interval as the power changes during RF activity. 

    Thank you for being more specific about your application - this helps me understand your issue better.

    Jebakumar said:
    Before it was such that there was no scanning or one scanning reported per second for the intended devices until next power cycle. But now it is that in the same power cycle, after few seconds of zero or one advertising report it becomes normal, it means we are getting 3 to 10 reports.

    Hm, strange that you are going a couple of seconds with either zero or one advertising report..
    Could you use the sniffer tool as suggested, to check how many advertisements that are being sent, compared to how many that are received in the time period?

    Jebakumar said:
    I configured the advertising timeout to 1 sec. Advertising restarted after every timeout. Even if two device start the scanning same time, due to random delay added in advertising will make them to scan each other enough, right? As we faced performance issue I thought to restart advertising periodically with timeout. 

    I do not think it should matter that you restart advertising every 1 second - I do not think this should have any kind of positive impact on the performance.
    I am not sure I understand your questions here either - if they start scanning and advertising at the same time then the windows will drift off of each other due to the random delay, yes - but you may account for this, by having a sufficiently large enough scan window.

    Jebakumar said:
    It is not about re-connection issue. I have used the sniffer before. I will try to take sniffer trace after few configuration tests.

     Great! Seeing a sniffer trace along with the description you are providing would be very useful, thank you.

    Best regards,
    Karl

Related