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

What is the difference between SCAN_WINDOW and SCAN_DURATION?

#define SCAN_INTERVAL                   0x00A0      /**< Determines scan interval in units of 0.625 millisecond. */

I am a beginner in this field. I am not sure what does this hexadecimal number mean here? The decimal of 0x00A0 is 160. So does it mean 160*0.625 ms of interval? 

Parents
  • Hi

    The scan interval decides how long it will be between each time the radio scans each scan window. The scan duration is for how long a device should scan using this scan interval and scan window before going to sleep.

    You are correct about the hex value here. For example, if the scan interval = 0x00A0, the scan window = 0x000A, a device will scan for 16*0.625 ms (10ms) every 160*0.625ms (100ms). Then the scan duration will decide how long the device will keep this up before going to sleep. You can disable the duration (let it scan indefinitely) by setting the scan duration to 0.

    Best regards,

    Simon

Reply
  • Hi

    The scan interval decides how long it will be between each time the radio scans each scan window. The scan duration is for how long a device should scan using this scan interval and scan window before going to sleep.

    You are correct about the hex value here. For example, if the scan interval = 0x00A0, the scan window = 0x000A, a device will scan for 16*0.625 ms (10ms) every 160*0.625ms (100ms). Then the scan duration will decide how long the device will keep this up before going to sleep. You can disable the duration (let it scan indefinitely) by setting the scan duration to 0.

    Best regards,

    Simon

Children
Related