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

NRF51422 Bluetooth: Long time between send and receive from message

Hello together,

I' am working on a Bluetooth application and have a problem with the transmitting time of the Bluetooth.

image description

In this Screenshot you can see the end of my command which i want to send from my NRF422 to my NRF422 Dongle. The second peak from the Debug pin indicates the send of the "Request Transfer" for the Bluetooth message. The Buffering just takes 0.26ms.

image description

In this image I receive and Send my Bluetooth message via UART. (second peak debug pin). The message i received is exactly the same i sent and it is working every time. The Time for the Buffering is just 0.41ms.

image description

Now my Problem: The Time in between send and receive is about 160ms and that's to long. Does someboy has experience with the Bluetooth Stack and knows what could cause the problem?

Thank you.

Best regards,

Fabrice

  • Hi Fabrice, it's little hard to follow your explanation. What exactly you mean by "Request Transfer for Bluetooth message"? What do you mean by "Buffering takes only XY ms" (who is buffering what and why)? Does it mean that you transfer some message over wired UART interface (at what speed? You can go from few kilobits per second up to one megabit...) and then you expect that transfer over BLE will take the same? On what BLE layer you communication (directly on link layer with custom PDU structure or you use "full" stack up to GATT Server/Client roles)? Assuming your data transfer is connection based what connection parameters (mainly connection interval) do your master (GAP Central?) device use and how many PDUs (MTUs if you use GATT) you transfer? Can you employ Nordic's BLE sniffer or something similar? Cheers Jan

  • Hi Fabrice,

    When you mark the point of "Request Transfer" what exactly is called at that point ? You queued the command using sd_ble_gattc_write() or sd_ble_gatts_hvx() ? Note that when you call those command, if there is other commands in the buffer, they will be sent first.

    And a BLE packet can only be sent on a connection event, not when you call the API. So if you have a very long connection event, for example 500ms, a packet may have to wait up to 500ms before it's send (with the condition that there is no other packet is queued prior).

    You should check your connection event, try to change it to a lower one for example 7.5ms and check if it can reduce the latency.

  • Thank you Jan and Hung Bui for your fast reply. I was able to fix the problem with checking the connection event and increasing the FAST_TIME_TICKS.

    Best regards, Fabrice

Related