This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Timeslot-API: how to minimize the effect of BLE

Hello,

in our device we use the Timeslot API to share a 802.15.4 based protocol with BLE, softdevice is S140 6.1.1.

Problem: the 802.15.4 protocol misses appr 10% of the slots it is requesting even if BLE is just advertising.  I assume that this is because the Softdevice is doing some internal tasks.

When BLE is switched off, this ratio is around 2.5%, which is not perfect but would be ok.

My goal is to have BLE and 802.15.4 in parallel, unfortunately the 10% slot misses are not acceptable.

So I started to play around with BLE parameters, esp. sd_ble_gap_ppcp_set() and the advertising rate via sd_ble_gap_adv_set_configure().  But actually there is no change in the slot misses, it's always around 10% if BLE is enabled.  No matter if the BLE intervals are reduced or increased.

I'm wondering if I'm missing a point and if there is a way to reduce the number of timeslots the Softdevice is requiring on its own.

Thanks for any suggestion.

Kind regards

Hardy

Parents
  • Hello,

    the 802.15.4 protocol misses appr 10% of the slots it is requesting even if BLE is just advertising

    How do you determine this? (I am not doubting it, but I just want to know what observations you base this conclusion on). Does it also mean that it misses 10% of the radio time, or is it rescheduled?

    And what are your advertising parameters? How often, and how much (approximate payload length) are you advertising?

    Best regards,

    Edvin

  • Hello Edvin,

    I have to apologize for wasting your time.  The fault was on my side: the function changing the advertise interval was immediately overridden by another function which sets the interval to 152.5ms, so I have measured always against a constant advertisement interval.  To bad.

    After correcting this, it "worked" as expected: timeslot misses are now somehow correlated with advertising interval.

    So at least I can confirm, that advertising does influence the timeslots you can expect to get.

    But still one question: does that mean, that advertisements have a high priority?

    Thanks & kind regards

    Hardy

  • Hello Hardy,

    The softdevice will run on the highest priority, and the 802.15.4 will request timeslots in between the scheduled BLE activities. In reality, the 802.15.4 will run 100% of the time, except when the Bluetooth Low Energy (BLE) stack is actively using the radio. The "issue" is that packets that are not yet transmitted/received 100% will be interrupted when the BLE stack is taking over.

    Since BLE is running on top priority, it is worth knowing that all BLE activity you add will take the time from the 802.15.4 stack. In other words, doubling the advertising interval will interrupt the 802.15.4 stack twice as much, and a short BLE connection interval instead of a long BLE interval (if you are using connections) will do the same

    Best regards,

    Edvin

  • Hello Edvin,

    thanks for the explanation.  Is it possible, that the Softdevice is needing timeslots even if BLE is disabled?  I mean despite for flashing.

    Kind regards

    Hardy

Reply Children
  • There are examples that uses thread and zigbee only, without BLE. In those cases the softdevice is not flashed, and the timeslots are not required. I am not completely sure how it works if you run the BLE+thread/zigbee examples and don't start any BLE activity. I guess that the 802.15.4 stack would still request timeslots, but as the softdevice is not doing anything else, it will always accept them.

    Best regards,

    Edvin

Related