BLE Extended Advertising: Is there a way to control the delay between adv on primary channels and the extended advertisement.

Hi DevZone! 
I am developing a Bluetooth beacon that needs to use extended advertising due to the need of periodic advertising. I am using custom board with nrf52820, nRF Connect SDK 2.7.0, Zephyr.
In this case the device should send small packet on Primary Channels (37,38,39) and then the actual packet somewhere in the future on the Secondary Channel. 
What I observe is that nrf52820 is not sending that extended packet as soon as possible after the primary packet, instead it seems to change the delay between them ever so slightly every time. It appears to use the whole advertising interval for that, meaning if I set the interval of 100ms the extended packet will be sent as late as 99ms after the primary packet or as soon as 1ms after. 

This is terrible for my design where multiple beacons can be in the same area and the device that is scanning for them can be "locked" to one of them for as long as 99ms (scanner will wait for extended packet once it heard the primary packet) not looking for other beacons at that time.

My question is - is there a way to control this behavior? Can I somehow tell the chip to send extended packet on the secondary channel as soon as possible after the primary packet? 
I have a device with the chip from other manufacturer which seems to do it that way (so it looks like a difference in Bluetooth stack implementation) and I get much better results with my application. 

Any advice would be highly appreciated, thanks! 

 

Parents Reply
  • Thank you   for your answer, I gathered some logs with Wireshark sniffer and was able to observe exactly what I described in my original post. The AuxOffset lowest value is 6300us and is increasing with every packet until it reaches around 100ms which is my advertising interval and then starts over. 
    This is the exact moment of it going from max to min:

    Notice the time distance between 1 and 2 packet is 107940us, and between 3 and 4 it's only 6300us.
    I attach the session from Wireshark:
    ExtAdvInt100ms.pcapng

Children
  • Hmm there should be three consecutive ADV_EXT_INDs before the AUX_ADV_IND in an advertising event. It seems the second and the third ADV_EXT_IND (on channel 38 and 39, respectively) are missing. Are there any other ongoing roles on the advertiser?

    It'll be nice if you could show how to reproduce it

  • Sorry there is only one because I disabled two Primary channels doing some tests and forgot to turn them back on, but that doesn't change anything. 

    What I was able to find out in the meantime is that this is a behavior of the Zephyr controller, I had it in fact turned on by:  CONFIG_BT_LL_SW_SPLIT=y. 
    Disabling it and turning on the Softdevice from Nordic by using 
    CONFIG_BT_LL_SOFTDEVICE=y seems to change that behavior to more what I would want, the Aux Offset is now static for all primary channels with 1110us, 810us and 510us for channels 37,38 and 39 respectively. 

    To reproduce that it should be enough to just setup extended advertising with the SW_SPLIT turned on. 

  • I see. SoftDevice Controller is developped and supported by us at Nordic. We recommend using it as it has a rich feature set and it's qualifiable. Is there a specific reason for using the Zephyr controller instead of the SDC?

    To get support for the Zephyr controller, you could raise an issue here https://github.com/zephyrproject-rtos/zephyr/issues 

Related