Periodic Advertising Issue

Hi Nordic Community

I have been building a thermometer device from which I would like to send temperature values via periodic advertising. 

I have based the sender and receiver off the Zephyr "periodic adv" and "periodic sync" examples provided in the SDK which I have modified for my purposes. The main change I have made is to move over to "LE Coded" transmission by adding BT_LE_ADV_OPT_CODED to the advertising parameters. I have also increased the TX power to 8dBm.

I am using an nRF52840DK as the sender and nRF52833DK as the receiver. 

I have managed to get everything working and the peripheral is successfully sending data and the receiver is successfully synchronising to the peripheral and then receiving temperature data.

I initially set the BT_LE_ADV (BT Advertising) interval to 1s and the BT_LE_PER_ADV (Periodic data transmission) to 1s and everything works fine.

In an effort to reduce power usage I wanted to reduce the interval to 10s for both the BT Advertising as well as Periodic Data transmission however when I do this I have problems and the receiver won't synchronise.

From what I understand in the receiver sample code, the device looks for BT Advertising data and then inspects the data for an "Interval" which indicates that there is periodic data being sent. It then uses information in the BT Advertising event to retrieve the info required to synchronise with the periodic data being sent.

In my testing I set the Periodic Interval to 10s:

If I set the BT Advertisement Interval to 1s then the receiver synchronises without issue.

If I set the BT Advertisement Interval to 3s then the BT Advertisement sometimes doesn't contain the "Interval" data required for the receiver to get it's periodic sync info but it eventually does come through.

If I set the BT Advertisement Interval to 5s then the frequency of not including "Interval" data increases.

If I set the BT Advertisement Interval to 10s then it never seems to contain the "Interval" data.

Is there any advice on how to get this working reliably when setting both the BT Advertising as well as the Periodic Data transmission to 10s intervals?

Is there another way to set up the synchronisation without relying on the "Interval" being available?

Here are some screenshots showing the terminal on the receiver when the Periodic Interval was set to 10s and the Advertising Interval was varied between 3s, 5s, and 10s.

3 second advertising interval:

5 second advertising interval:

10 second advertising interval:

I would appreciate any guidance. Thanks for your help.

Gary

  • Gary T said:
    As a suggestion, since the AUX_SYNC_IND depends on information provided in AUX_ADV_IND, doesn't it make sense to transmit AUX_SYNC_IND after AUX_ADV_IND? This would solve all the issues. I could then set both events with the same frequency and AUX_SYNC_IND would always be within 2.5s of AUX_ADV_IND. I could then set both to 10s and use a lot less power (11.3µA for my peripheral which means my battery would last 50% longer!)

    Your point is valid and after reading the spec, I do not see why we cannot do that. This most likely is a design decision made for making scanning more predictable. But this thread definitely has given enough points to re-evaluate these offsets.

  • I think adding the delay between AUX_ADV_IND and AUX_SYNC_IND might work the first event but then the LL controler takes over the timing and then it is back to the same timing you saw without the k_sleep. 

    Yes, It seems that there needs to be some design changes needed to facilitate your use case. Unfortunately we are not stuck the max interval of 2.5s to sync faster with the scanner

  • Thanks Susheel.

    I appreciate your time and effort to try and solve this issue.

    I hope you are able to raise this with the relevant people so that they can perhaps provide a solution in the future.

Related