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

Recommended Scan Interval / Scan Window settings for beacon detection

Hello

I am trying to discover the correct scan interval/window settings to capture the  advertized packets from a beacon transmitting every 100ms(10Hz).

Should I just set the scan interval and window to the same value?  

What is the penalty to setting the scan interval to a faster setting (other than increased power consumption)?  Can I capture several advertising packets in one scan interval?

Power is not an issue, I just want to get all of the packets and their corresponding RSSI values.

Do you have any suggestions or recommendations that would help me capture all packets?

I am using an nRF52832, SDK 13.1 and the ble_central\ble_app_UART_c\ example.

Thank you,

-Ben

  • Hi,

    Here you can see the relationship between advertising packets and scan window and interval:

    If you don't have any power constraints I would recommend setting the scan window equal to your scan interval. That way you will scan 100 % of the time.

    You may get several advertising packets per scan interval. 

  • Hi Martin,

    Thank you for the graphic, its helpful.

    I am also interested in the other implications on making a longer interval (keeping the scan at 100%), If I DO intend to keep scanning at 100% of the time, should I make my intervals shorter or longer?  Is there a benefit either way? i.e., do I take up more processor time with shorter intervals?

    Thanks!

  • Hi,

    The Softdevice will spend approximately 1.5 ms per scan interval on processing and scheduling (not including processing of received advertising packets). So due to this overhead it is best with as long scan interval as possible. But remember that you only change advertising channel when you change interval/window.

  • Hi Martin,

    If I do not want loss any times adverting package from one advertiser , should I set the scan window and scan interval longer than advertisng interval ? such as:

    adverting interval: 500ms/1s

    scan interval : 600ms/1.1s

    scan window: 600ms/1.1s 

  • Hi, I have a similar case and sometimes I am experiencing a lost of packets for few seconds.

    In my case I am using 2 or more Thingy52, and both of them is sending beacon every 200ms.

    They also have the scan active, so they are able to detect the other devices reading the beacons.

    At the moment, I set the scan interval to 0xA0, 100ms and the scan interval to 90ms.

    If I set the scan interval to 100ms as the scan window, I receive lot of NRF_EVT_RADIO_BLOCKED events. Not understood if it is something normal, but I don't think so.

    Can you explain why I receive these events?

    The major problem that I have, and I don't know if it is correlated to this, is that sometimes for 3/4 secs (even more sometimes) I am not able to receive any BLE_GAP_EVT_ADV_REPORT even if the beacon from the other devices are regularly sent.

    Can you help to understand why?

    Thanks

    M.

Related