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 Reply Children
  • 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

Related