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

How can I decide scan window, interval for continuous scanning.

Hi.

I'm currently trying to scan non-connectable advertisement for continuously.

So, I'm going to set the value of scan window and scan interval same.

For that purpose,I want to simulate the value of scan window & interval for the best performance (for the least number of packet loss).

What will be the right approach to simulate the best value?

Additionally, if I don't have to worry about power consumption of scanner(ble central), would it be good to set scan window as minimum value (which is 2.5ms)

Thanks in advance.

Parents
  • In general if you set scan window equal scan interval, then the radio will be ON about 100% of the time. There will be a short period of a few hundred us (depending on the softdevice release, don't have exact numbers) after each scan interval where it will change frequency to the next advertisment channel, during this period it can't receive any advertisement packet. It will rotate between the 3 advertisment channels after each scan interval.

    Typically I recommend to set the scan window to minimum, and adjust scan interval to fit the current consumption requirements of the application. The reason I recommend a short scan window, is that it will have minimum effect on other softdevice functionality you might want to use in the application. For instance other connections will be blocked during a scan window, and a long scan window can delay execution of flash commands and timeslot api.

  • Typically an advertiser will advertise on 3 channels, if a scanner is actively scanning during that period, then the packet loss should be close to 0. What can prevent this?

    • Boards are not properly tuned or out of range of each other.
    • Interference from other 2.4GHz equipment.
    • The scanner is switching channel or idle waiting for next advertisement window.
Reply Children
Related