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

Parents Reply Children
  • OK, I tested this and it seems that since the ADV_EXT_IND interval in le_advertising_param and AUX_SYNC_IND interval in periodic_param might be causing some collisions in the timeslots most likely causing the adv ind to not transimit the interval sometimes. Try to select the intervals of ADV_EXT_IND and AUX_SYNC_IND not to be multiples of each. I understand that there should be some radion delay between adv events, but there seems to be a connection in how you select the adv_params and periodic_sync_interval parameter

  • Thanks Susheel

    In order to test this I have kept the ADV_EXT_IND interval at 10s and have varied the AUX_SYNC_IND interval across 9s, 8s and 7s. It takes anywhere from 2 to 5 minutes for the receiver to synchronise. The peripheral/sender is still sending lots of events with no "interval" included even though the ADV_EXT_IND and AUX_SYNC_IND events are quite far apart. 

    I have tested this using my phone (with the nRF Connect App) as well as an nRF52833DK.

    I am still confused about why it works if I increase the interval frequency. If I set both intervals to 1s then the receiver synchronises almost immediately. The "interval" is included in the very first transmission.

    Do you know the logic used to include the "interval" into the initial advertising message?

  • There clearly is some logic behind the optimal settings here and I cannot figure out what that is by looking at the documentation. I will have to reach to the BLE team to gain more knowledge. I will be back to you with more info soon.

Related