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

Increasing latency.

Hi, i use SDK 15.0.0 ble_app_uart_pca10056_s140 nrf52840

I set BLE parameters like this:

#define MIN_CONN_INTERVAL                MSEC_TO_UNITS(7.5, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL                MSEC_TO_UNITS(12.5, UNIT_1_25_MS) 
#define CONN_SUP_TIMEOUT                 MSEC_TO_UNITS(4000, UNIT_10_MS)
#define SLAVE_LATENCY     0

#define FIRST_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(4000) 
#define NEXT_CONN_PARAMS_UPDATE_DELAY    APP_TIMER_TICKS(30000)
#define MAX_CONN_PARAMS_UPDATE_COUNT      2  

my device send 20 byte every 3ms, my Android program has a timer measures the Latency between packets, first 8-10 minutes i have 3.2-3.4ms latency, then after a 5-6min increased  to 5.5-6ms latency, still after some time  increased  to 11-12ms.  On different phones this problem occurs at different time intervals.

How can I fix it? I need stable 3-3.4ms latency.

Thank you very much.

Parents
  • Hi,

    I assume there is a typo, and that 3.5 ms is not the latency you expect? After all, 7.5 ms is the minimum connection interval in BLE.

    In any case, it sounds like the connection interval is gradually being increased by the Android phone. A sniffer trace could confirm whether this is the case or not. The connection interval is determined by the central, though a peripheral can request a change. Assuming this is the problem, you could try to always request a connection parameter update whenever the connection interval becomes larger than what you would like.

Reply
  • Hi,

    I assume there is a typo, and that 3.5 ms is not the latency you expect? After all, 7.5 ms is the minimum connection interval in BLE.

    In any case, it sounds like the connection interval is gradually being increased by the Android phone. A sniffer trace could confirm whether this is the case or not. The connection interval is determined by the central, though a peripheral can request a change. Assuming this is the problem, you could try to always request a connection parameter update whenever the connection interval becomes larger than what you would like.

Children
No Data
Related