Packet loss due to interference in ble.

Board: nRF52810

SoftDevice: s112

SDK version: 17.0.2

I've developed a BLE application where nRF52810 as peripheral and nRF52833 as central. The peripheral continuously sends data to the central and mostly operated in a very close range. While testing my application in a crowded environment I'm experiencing data loss ( I suspect it's due to external interference ). I've checked the RSSI then, it is around -45 dBm ( I think the signal strength is good ). How can I overcome the problem?

Thank you in advance.

Parents
  • Hello,

    Make sure to use maximum output power, and make sure you have got help to tune the antenna for optimal performance, a poorly tuned antenna will reduce the effective output power radiated. If you are using the internal LFCLK (internal RF 32kHz), then make sure you have set the tolerance to 500ppm and that the LFCLK callibrate the RC oscillator. This should ensure that you have a good design with good output power and that the peripheral tolerate timing drift between the two peers.

    You can also consider to use shorter connection interval, this will allow more time to send data.

    Best regards,
    Kenneth

  • Hi Kenneth,

    I'm already using maximum tx power (4 dBm) and the tolerance is 500ppm. The connection interval is 7.5ms (min) and 15 ms (max), which I think is a shorter connection interval. Though I'm getting data loss due to interference.

    Does Channel Hopping has to do anything to make it efficient? Will QoS or Adaptive channel hopping help me to overcome the problem??

    Thanks in advance.

  • I don't really see that will help no. What throughput do you have here? What latency requirements?

    Kenneth

  • Hi,

    What throughput do you have here?

    I assume NRF_SDH_BLE_GAP_EVENT_LENGTH is the factor that determines throughput, It is set to 6.

    What latency requirements?

    The data is sent continuously and every piece of data is crucial. So the Latency is set to 0.

  • There is a nice blogpost here that describe how to improve throughput:
    https://novelbits.io/bluetooth-5-speed-maximum-throughput/

    Have in mind that S112 does not support Data Length Extension (DLE), which means the maximum packet that can be sent on-air is only 23bytes, this will decrease the throughput a lot. I recommend to consider the S113 that support up to 244bytes of data in each packet.

    Kenneth

  • Hi, 

    From this post I came to know to enable DLE I have to increase the NRF_SDH_BLE_GAP_DATA_LENGTH  value, but My NRF_SDH_BLE_GAP_DATA_LENGTH  value is already in 251. Does the DLE is enabled already?

     I saw the following paragraph in this blog. This suggests keeping the connection interval less in the time of interference. But to achieve higher throughput it suggests having a higher connection interval. What to follow??

    "A higher connection interval will give higher throughput if this option is enabled. This is different compared to older Nordic BLE devices and stacks, where you wanted the connection interval to be as short as possible for maximum throughput. One drawback here is that if there is a lot of interference and packets start getting lost. If a packet is lost, the device needs to wait for the next connection event before sending more packets (after resending the lost packet). The wait time can be anywhere from close to zero to the length of the connection interval. In other words, a long connection interval will improve the throughput when the link quality is good, but could reduce the throughput when there is a lot of interference or when the distance between the devices is large."

    If this NRF_SDH_BLE_GAP_DATA_LENGTH  value doesn't determine the DLE, Then how can I enable it?

  • If you look at the peripheral BLE examples you can find that most of them use gatt_init(), which will upon connection exchange max MTU sizes, you can get the result of the max supported MTU size by looking at the callback handler: gatt_evt_handler() and the events NRF_BLE_GATT_EVT_ATT_MTU_UPDATED (max attribute size) and NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED (max on air size, a long attribute may be split across several of these). Example of implementation is shown in this reply:
    RE: BLE5 - Make payload size 200 bytes - the right way 

    Typically you want the data sent to be as close as possible to the max data length (NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED) for most efficient transfers.

    In a perfect world with no packet loss having a slow connection interval can give the highest throughput, but considering we don't live in a perfect world I would claim you should have a fast connection interval, this will reduce the max peak throughput, but allow stable throughput.

    Best regards,
    Kenneth

Reply
  • If you look at the peripheral BLE examples you can find that most of them use gatt_init(), which will upon connection exchange max MTU sizes, you can get the result of the max supported MTU size by looking at the callback handler: gatt_evt_handler() and the events NRF_BLE_GATT_EVT_ATT_MTU_UPDATED (max attribute size) and NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED (max on air size, a long attribute may be split across several of these). Example of implementation is shown in this reply:
    RE: BLE5 - Make payload size 200 bytes - the right way 

    Typically you want the data sent to be as close as possible to the max data length (NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED) for most efficient transfers.

    In a perfect world with no packet loss having a slow connection interval can give the highest throughput, but considering we don't live in a perfect world I would claim you should have a fast connection interval, this will reduce the max peak throughput, but allow stable throughput.

    Best regards,
    Kenneth

Children
No Data
Related