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

  • 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.

  • I use two Raytec DK boards, so I assume that should be fine. I am not sure what TX audio is using since I have no control over that code.

    But regardless, the RSSI measurement is from the board, and my impression was that coded phy should handle RSSI of even -100dBm. I don't understand that part.

  • Hi,

    Yes, if perfectly tuned, the sensitivity is about -100 dBm (+/-, dependin on 125 or 500 kbps mode). But this is under ideal conditions, so if there are interference or non perfect matching you may not get as good results. Regarding the Raytec DK boards, I would assume that they have properly tuned those, but I do not have data on how well they perform, so it could be worth checking with them or comparing with nRF52840 DKs in the same environment if you have.

  • Hi, 

    I finally purchased two NRF52840DK boards, installed the central_hr_coded and peripheral_hr_coded. Went out to a open field and tried it. Unfortunately I do not come even close to the 100dBm (lowest i measured was -89dBm, so little better than the Raytec, but again, this was in an open field, not in a building.

    I have tried using ESP32 to compare using WIFI, and the signal robustness is much better. I assume this is because they can go up to +20dBm in signal strength making a huge difference.

    Any final ideas what we could do to improve things? Would you think an external antenna will make a significant impact, or would that only give a few + on the dBm compared to PCB antenna?

    Thank!

  • Did you measure the sensitivity or the range? How did you measure? As you write, if you are testing other devices with +20 dBm that will have a significant impact on range.

    I do not expect you will get a significant improvement with a different antenna (unless you were to use directional antennas for stationary devices)

  • Both - the sensitivity was measured by outputting the RSSI value. 

    Range was measured by estimating distance after walking away with one of the devices.

    I estimate that i get disconnects starting from 50m. 

    For reference, the field is an  outdoor horse riding arena. 

Reply Children
  • Hi,

    jber1 said:
    Both - the sensitivity was measured by outputting the RSSI value. 

    You cannot measure the sensitivity like this. That has to be done in a controlled setting where you know the actual power and measure if reception is possible or not. The RSSI estimate in the radio is only valid down to -90 dBm. See RADIO electrical specification.

    jber1 said:
    I estimate that i get disconnects starting from 50m. 

    That is an unexpectedly short range in an open environemnt if transmitting with + 8 dBm (?), but it depends a lot on other factors as well like RF interference and connection parameters (how many packets you can loose before a disconnect). For reference, see this post.

  • 1) OK, that was good information. Thanks

    2) No, in this test i didn't run it on +8dbm, running on default. And comparing to your post I didn't align the planes either, so maybe that brings me down 28dBm (antenna plane seems to differ 10dbm x 2 (per device) + 8 dBm (tx power). If the distance double for every 6dBm then 28/6=~5, and 50*2^5 = 1600m, which matches the max length. Extremely high level obviously, but I guess it makes sense as well.

Related