This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to avoid delays and retrieve the samples on time ?

Sorry if these questions are discussed already. I'm a newbie to Bluetooth project. Let me explain in brief. I have a central and peripheral device. I am transmitting 10samples/10ms (dummy data) through BLE and the central device is receiving those samples and logging it via UART. The connection interval is 10ms(on both sides) and the range is tested for 2metres. I would like to know about how to reduce /avoid delays and receive samples within the interval(same way as transmitted). I logged the data and analysed the following: Sample delays Potential Disconnections

Although the disconnections are close to zero, I am observing the delays in the samples.

Platform specifications nrf52840

soft device: s140

Data logged for 15 mins

Where could be the bottleneck? Is it the central device or the UART? How to solve this and reduce the delays. Please help me.

Thanks in advance!

Parents
  • Hi Nivetha,

    Your graph looks maybe strange on the first sight but in general you are almost there from my perspective:

    • If you use Notifications to send data every 10ms then you should see major load on 10ms line with (possibly as few as possible) dots on 20ms (or even higher in case of some longer disturbance) and 0ms (this one compensates the loss when several packets waits in the stack and get finally transported within single connection interval) lines.
    • The fact that you see very similar effect (maybe with too many re-transmissions on +10ms line) but with +10ms offset signals that you either use wrong GATT methods or that some part of the system waste all that.
    • It can be inside your FW or it could simply be only by using UART output (how are the data linked between receiving event in your FW and UART driver?) or just simply systematic error on the PC host where you analyze UART serial data.

    BLE trace from (e.g. Nordic) sniffer will definitely help to understand if your BLE GATT protocol is optimal, then you can move forward in debugging.

    Cheers Jan

  • @Hung Bui: I understand that BLE is a reliable protocol. I'm currently using for a medical application where there should be minimal retransmissions i.e. packets should be received on time for 90-95 percent of the cases. Although this application is not life threatening, it has to trigger other devices such as respiratory support based on the reception of data. Hence, I am looking at how to reduce delays/connection loss etc. @endnode: I got the nrf52 DK to act as a sniffer and trying to debug packet loss, etc. As you said, there could be something wrong with the data packing at the FW level. Looking into it. Thanks for the optimization ideas:)

Reply
  • @Hung Bui: I understand that BLE is a reliable protocol. I'm currently using for a medical application where there should be minimal retransmissions i.e. packets should be received on time for 90-95 percent of the cases. Although this application is not life threatening, it has to trigger other devices such as respiratory support based on the reception of data. Hence, I am looking at how to reduce delays/connection loss etc. @endnode: I got the nrf52 DK to act as a sniffer and trying to debug packet loss, etc. As you said, there could be something wrong with the data packing at the FW level. Looking into it. Thanks for the optimization ideas:)

Children
No Data
Related