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

nRF51 interval and scan window

Hi,

How can I know the value of the interval and scan window for an nRF51 dongle? Is there any way to change these values? What is the valid range for both parameters?

I'm using BLE beacons iBKS105 (based on the nrf51822 chipset from Nordic Semiconductor) and Wireshark 2.4.6

Thanks in advance!

  • Hello.

    What do you mean with "know the value of the interval and scan window"?

    Do you write an application for the dongle using the SoftDevice, or are you using the nRF Sniffer?

     

    If you use the softdevice in your application, e.g. in an example, you will see the scanning interval and -window in the top of the main.c file.
    Typically, you have the parameters SCAN_INTERVAL and SCAN_WINDOW. These are given in units of 0.625 milliseconds. These have to be between BLE_GAP_SCAN_INTERVAL_MIN and BLE_GAP_SCAN_INTERVAL_MAX, which is 0x0004 and 0xFFFF, respectively.

    This gives the softdevice limits of scanning interval of minimum 2.5ms and 40.959 375 seconds.

    Also, the scan window <= scan interval.


    Best regards,

    Edvin

  • Hello Edvin,

    Thank you very much for your quick response and help. I am a newbie in this subject and I regret not having explained myself correctly: I am just using the nRF51 sniffer and not writing any application.

    What I really wanted to ask is that, if I am using the dongle as a central device and sniffing the advertising packets sent by the peripheral device (dongle), what are exactly the values (in milliseconds) of the scan interval and scan window? (as explained here: (section A.I) https://devzone.nordicsemi.com/b/blog/posts/bluetooth-smart-and-the-nordics-softdevices-part-1) . I'm assuming (maybe wrongly) that these are values set in the dongle: Is there any way to change them and how?

    Thank you very much again!

    Best regards,

    G.

  • If you are using the nRF Sniffer firmware, found here (are you?), then it is not possible to change the interval. I am not certain exactly what the interval is, but if it is important, I can try to find it out. But it is sniffing 100% of the interval. Why are you asking? Are you missing any packs?

     

    Best regards,

    Edvin

  • Hello Edvin,

    Yes, I am using nRF Sniffer v2.

    My question arose after seeing the attached image (from the URL I mentioned in my previous message) and doing a couple of tests with 1 beacon iBKS105 +1 dongle nRF51 + Wireshark 2.4.6.

    The problem is not that I am missing packages but that I receive too many (as I explain here), and I thought that I was not taking into account some important theoretical concepts like Scanner scan interval and Scanner scan window. 

    Well, you said that with the nRF Sniffer it is not possible to change the scan interval and it is sniffing 100% of the interval, so I assume that in my tests the sampling time is the same as the scan interval, right?

    Thanks again for you help!

    G.

  • I didn't know that you had a separate case on this issue. Ok, so you see too many advertising packets. What is your advertising interval? It is called something like APP_ADV_INTERVAL, depending on what SDK you use. Remember that this value is given in 0.625ms, so if you want 1s advertising interval, you must set this to 1600.

    You should only see 3 advertising packets per second using the nRF Sniffer. I have tested this now on my computer, and with an advertising interval of 1600 (1000ms), I can only see 3 advertising packets per second (one for each channel).

    How do you switch between the two beacon modes? Can you try it with only one beacon mode, and an advertising interval of 1600 (1000ms)?

     

    Best regards,

    Edvin

Related