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

Advertising interval time test

Hi Sir/Miss,

We want to test advertising interval time of peripheral device to follow APPLE accessory guideline.

We found some topic on forum, it mentions that uses sniffer is better than nrf connect APP.

https://devzone.nordicsemi.com/f/nordic-q-a/23586/how-can-i-measure-the-advertising-intervals-of-a-peripheral

I set up advertising interval as below on original example code.

EVB: PCA10040

SDK: 15.2

SES: 3.40

Softdevice: s112 

Use project: ble_app_uart  pca10040e

But, we use nrf51 dongle to be sniffer to check interval on following "nRF_Sniffer_User_Guide_v2.1.pdf".

Wireshark version: 2.6.1

environment: sheilding box

Each time delta of data is different, but not near 20 ms. All of data is lower than 20 ms.

How do I check advertising intervals?

Thank you.

  • Hi,

    There is a random 0-10 ms delay added to each advertising event, which makes it difficult to find the exact advertising interval like this. However, you should be able to get a good idea, and you can get a quite accurate number if you measure for some time and calculates the average delta between the received advertisement packets.

  • Hi,

    Thank you for your reply.

    I still confuse about it. 

    May I ask how much number of average delta is between received advertisement packet?

    I calculate 400 data(0~8 sec) that result is 0.017462 sec, maximum delta and minimum advertising interval is 0.027288 sec and 0.013253 sec.

    Or, I must calculate all of data between 0 and 30 sec.

    But, it doesn't have any criteria about advertising interval (e.g. 20 ms, + 1 and -1 ms).

    And, does it have any test(method, equipment) and calculate rule to be correspond of APPLE advertising interval?

  • Hi,

    Ben said:
    May I ask how much number of average delta is between received advertisement packet?

    You can refer to BLUETOOTH SPECIFICATION Version 5.0 | Vol 6, Part B section 4.4.2.2.1 (page 2610-2611) if you want to know the details. In a nutshell the time between two advertising packets is the advertising interval + random delay, where the advertising interval is whatever you have configured, and the random delay is somewhere between 0 and 10 ms. This figure from the spec shows it well:

    Ben said:
    And, does it have any test(method, equipment) and calculate rule to be correspond of APPLE advertising interval?

    You should configure the advertising interval to match Apple's recommendations. So for instance say you want to use 152.5 ms in the ble_app_uart example in SDK 15.2, you set APP_ADV_INTERVAL to 244, since it is in units of 0.625 ms. This configures the advertising interval at exactly that, and essentially that is all you need to think about. Looking at the details, this is not exactly the same as the time between the advertising packets since it does not include the random delay, but that is not relevant with regard to Apple's recommendations.

    Ben said:
    And, does it have any test(method, equipment) and calculate rule to be correspond of APPLE advertising interval?

    I am not aware of any such test equipment that calculates the advertising interval for you. You can do this manually by averaging the delay over many advertising packets. If you get enough samples, you should measure a average time between advertising packets which is about 5 ms longer than the configured advertising interval (since this is the average of the added delay).

    The SoftDevice is well tested and qualified. As long as you configure the advertising interval correctly you can be confident that it will be correct. So in that case I would say looking at the advertising packets in a sniffer trace and seeing that the interval is roughly correct should be enough in practice.

  • Hey Einar, 

    I am using the nRF sniffer (based on NRF51422 DK and wireshark) to sniff my DFU adv packets which are set to 25ms interval, So I am expecting to catch 40 packets x 3 (for 37,38,39), so 120, what I am actually seniffing seeing is about 100 packets,does this make sense? because of the 0-10ms delay 

    Thanks!

Related