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

nRF Sniffer shows advertising interval too small

Hi,

According to below thread, the advertising interval has a random 0 - 10 msec delta, so if the adv interval is 20 mses, if run it for long enough, will the result be close to 20 msec? or will be anywhere between 10 - 30 msec? 

https://devzone.nordicsemi.com/f/nordic-q-a/46115/advertising-interval-time-test

I capture data using 1 nRF52840 DK and 2 nRF52840 dongles.

For the first 1000 adv, it took 818 msec in total, does it mean the adv interval is 0.818 msec? In this case, it does consume a lot of enery.

For the first 2000 adv, it took 13.709 sec, so the interval is 6.855 msec? 

See screen shot below.

  • Also the connection interval is smaller than i had expected, it is between 4 - 7 msec. I used the Bluetooth Low Energy app from the nRF Connect tool, which i had expected 100 msec connection interval.

  • Hi

    First off, this "Time" column is dated at the point which the nRFSniffer reports the events to the computer, and will not always be an accurate representation of the time between BLE events. If you right-click the column section in Wireshark you can add a column called "Delta time (µs end to start)" which will show how many µs each event lasts.

    The random 10ms delay will add 0-10 ms to each advertising interval, so if you set it to 20ms, each advertising will be 20-30ms apart.

    Best regards,

    Simon

  • Thank you Simonr for help.

    I recaptured at least 100,000 adv packets and look at the delta time as you suggested. To be fair i picked 10 packets from 10,001 (see screen shot), add the delta time for all 10 packets and i got 

    770 + 44843 + 770 + 770 + 46618 + 770 + 770 + 41227 + 770 + 770 = 138,078 usec, 

    that's for 10 packets, so the average adv interval is around 13.8 msec

    my donlge was running ble_app_blinky from ble_peripheral, APP_ADV_INTERVAL is defined to 64, which is 40 msec.

    #define APP_ADV_INTERVAL 64 /**< The advertising interval (in units of 0.625 ms; this value corresponds to 40 ms). */

    I visually inspected other delta time, they are look similar, a big value > 40000 followed by 2 small values < 1000, so i expect even calculate the whole 100,000 packets, the adv interval still would be near 13.8 msec.

  • jshen said:
    I visually inspected other delta time

     What you're seeing is the advertisement on each of the advertising channels (37, 38, and 39), the full time of one complete advertising event would be the first "long" one, and the two next "short" packets. So to calculate correctly you would have to do the following:

    ((44554 + 498 + 498) + (44571 + 498 + 498) + (46346 + 498 + 498)) / 3 = 46 153 µs (46,15 msec)

    The random 0-10 msec will be what is added to this "long" packet you're seeing, and you should see that all these are different between 40 000 to 50 000 µs.

    Best regards,

    Simon

  • Thank you very much, it makes sense now. The advertising interval actuualy is the time sending the same adv packet on all three advertising channels (37, 38 and 39). 

    I did a few more new test, it seems always the longest delta time occurs on channel 37, then two short ones on channel 38 and 39. I am curious is that always the case?

    Many thanks,
    Job

Related