Problem with disconnects - can I improve this?

Hello, 

I have a device that I want to operate on the lower range of RSSI (but still around -80dBm  and have problems with disconnect. I would like to understand if there is any software change I can change to improve connection reliability. See attached source file for my BLE class.

Much appreciated!

Jens

FILE: 


s10_ble.cpp

Parents
  • Hi Jens,

    There are some generic things you can do to improve performance under low signal conditions. Different products has different needs though, so all may not be auitable.

    • Use a long supervision timeout compared to the connection interval to allow for more retransmissions before supervision timeout occurs. This means that both reducing the connection interval and increasing the supervision timeout (or both), will reduce the likelyhood of disconnect due to supervision timeout.
    • Consider using Coded PHY (the 125 kbps variant) instead of 1 Mbps. This not as compatible though, particularily not with phones.
    • Consider using shorter packets, as with 1 Mbps PHY (and 2 Mbps for that matter), there is no forward error correction. So the longer the packet, the higher the likelyhood of an error within the packet.
    • Use higher Tx power (I see you are allready using 8 dBm so you will not be able to increase that without adding an external PA to the HW). Note that this will not help as much if the peer is using lower Tx power, as packets are going both ways (even if data is primarily going in one direclty, there are acknowledgment packets).

    Einar

Reply
  • Hi Jens,

    There are some generic things you can do to improve performance under low signal conditions. Different products has different needs though, so all may not be auitable.

    • Use a long supervision timeout compared to the connection interval to allow for more retransmissions before supervision timeout occurs. This means that both reducing the connection interval and increasing the supervision timeout (or both), will reduce the likelyhood of disconnect due to supervision timeout.
    • Consider using Coded PHY (the 125 kbps variant) instead of 1 Mbps. This not as compatible though, particularily not with phones.
    • Consider using shorter packets, as with 1 Mbps PHY (and 2 Mbps for that matter), there is no forward error correction. So the longer the packet, the higher the likelyhood of an error within the packet.
    • Use higher Tx power (I see you are allready using 8 dBm so you will not be able to increase that without adding an external PA to the HW). Note that this will not help as much if the peer is using lower Tx power, as packets are going both ways (even if data is primarily going in one direclty, there are acknowledgment packets).

    Einar

Children
  • Thanks for quick reply:

    1) OK - I think i have maxed out supervision timeout according to Apple spec (18sec)

    2) OK - Coded PHY is not compatible with iOS as I understand it.

    3) FOLLOW UP - How can I shorten the package size even further? The payload is only 4 bytes. What setting are you refering to?  When analyzing the packages in NRF Sniffer the "send handle value notification" is 38 bytes (from peripheral).

    4) FOLLOW UP - NRF52840 max at 8db as you say, do you know what iPhone is transmitting at? The reason for my question is that it would bring some light on wether or not a relay device could fix the problem.

    Other questions:

    5) I have tried listening to music using airpods at the exact same position that my device is, and that seems to work. Perhaps this implies that when the iphone is communicating with airpods, they increase TX power?

    Note I am using a Raytec based NRF52840 board, so the antenna config should be OK.

Related