Average Advertisement interval greater than what was set in sd_ble_gap_adv_set_configure

Hello,

I am using Nordic chip 82832 with sdk 17.1.0 and SoftDevice s132. I am facing an issue where a specific requirement requires my advertisement interval to be specifically a certain milliseconds. I was testing out the ble_peripheral_blinky example with advertisement interval set to 30ms (48 * 0.625 ms = 30 ms). I took a BLE sniff using Nordic BLE dongle which I have attached. The advertisement bursts seem so be a bit random with some nearly 30ms and some 35ms between two advertisement events. Is there any way to avoid this delay/randomness?

Nordic_Blinky_30ms.pcapng

Parents
  • This is required by the Bluetooth specification. Advertising interval will be "set value plus random delay between 0ms and 10ms". This is a hard requirement in the Bluetooth specification and can not be worked around.

    If you move to periodic advertising then the advertising interval in the data channels can be fixed to a given interval (like the 30ms you mention) while the packets in the advertising channels will have the randomized delay.

  • What causes this delay? And any ways by which this delay can be reduced or optimized?

  • Also the delay can be 0ms to 10ms so my advertisement bursts should be between 30ms-40ms right? But if you inspect the sniff I can see some advertisement bursts that are less than 30ms? What is the reason behind that?

  • The Bluetooth spec mandates this to ensure that collisions don't last "forever" if you have more advertisers in the area, the randomization ensures they will get through sooner or later. As this is part of the specification you will need to have it or else you won't have a Bluetooth product.

  • What about the bursts with interval less than the one being set? If I set it to 30ms then according to the spec it can be anywhere between 30ms-40ms but why then bursts <30ms? Any reasons for those ones?

  • This could be because of the way you measure and not because of the SoftDevice itself.

    Each “advertising event” is actually a group of packets , usually one on each of the three advertising channels (37, 38, 39). Those three packets are sent very quickly one after another, so they look like a short burst in the sniffer. And after each burst, the radio will wait for some time until the next event.

    So when you set 30ms as the interval, this means that after the START of a burst, the next event could happen anywhere between 30ms - 40ms. So it's the START of one burst to START of next burst.

    I guess what happens is that you are measuring the time from the END of one burst and the START of the next burst and you are not including the duration of the actual burst itself. i.e. you are measuring END -TO -START and not START -TO -START.

    -Priyanka

Reply
  • This could be because of the way you measure and not because of the SoftDevice itself.

    Each “advertising event” is actually a group of packets , usually one on each of the three advertising channels (37, 38, 39). Those three packets are sent very quickly one after another, so they look like a short burst in the sniffer. And after each burst, the radio will wait for some time until the next event.

    So when you set 30ms as the interval, this means that after the START of a burst, the next event could happen anywhere between 30ms - 40ms. So it's the START of one burst to START of next burst.

    I guess what happens is that you are measuring the time from the END of one burst and the START of the next burst and you are not including the duration of the actual burst itself. i.e. you are measuring END -TO -START and not START -TO -START.

    -Priyanka

Children
No Data
Related