Electronic – BLE Scan interval and window

bluetoothbluetooth low energyradioRFwireless

With Bluetooth Low Energy, you specify a scan window (how long to scan) and interval (how long to wait between scans).

Would there be any difference between scanning for 10 ms every 100 ms, or scanning for 1 sec every 10 sec? Seems like the chance two devices find eachother (have their radios on simultanously) should be equal in that case?

Is there a simple formula to calculate the right window/interval based on the maximum time allowed to connect?

Best Answer

According to the Bluetooth 4.0 core specification the time period of 'advertising events' are as shown below for the different types of advertising packets:

ADV_IND: General connectable and scannable advertisement packets' time period ranges from 20 ms to 10.24s in steps of 0.625ms.

ADV_DIRECT_IND: Directed advertisement packets' time period is less than or equal to 3.75 ms. This kind of advertisement events can happen consecutively only for 1.28s. This is for a establishing a quick connection (if there is a device listening).

ADV_NONCONN_IND: Non-connectable and non-scannable advertisement packets' time period ranges from 100 ms to 10.24s in steps of 0.625ms.

ADV_SCAN_IND: Scannable advertisement packets' time period ranges from 100 ms to 10.24s in steps of 0.625ms.

So, unless you know the kind of device you are scanning for a good approach would be continuously to scan for around 11 (max) seconds to see if there are any advertising devices around. How often to do this will depend on the amount of battery or power available.

Hope this helps.