Dear Nordic Specialist,
I am using two nRF5340 DKs running the Direction Finding connection-based Central/Peripheral examples, and I would like to evaluate the maximum achievable CTE (DF) packet rate.
At first, I did not find any explicit parameter in the DF configuration to control the CTE rate. Later I realized the CTE cadence is likely tied to the BLE connection parameters, especially the connection interval. I therefore configured the connection interval to 10 ms / 20 ms / 25 ms and tested each setting. With CTE_REQ_INTERVAL = 1, I initially receive one CTE approximately every 20 ms / 40 ms / 50 ms accordingly. These settings do take effect right after the connection is established, but only for a few seconds. After that, the two devices renegotiate the connection parameters and the interval changes to 40 units (50 ms). Once this happens, I can only receive about 10 CTE packets per second.
#define CONN_INT_MIN 0x14 /* 20*1.25=25ms */
#define CONN_INT_MAX 0x14 /* 20*1.25=25ms */
static struct bt_conn *default_conn;
static const struct bt_le_conn_param conn_params = BT_LE_CONN_PARAM_INIT(
CONN_INT_MIN, CONN_INT_MAX, CONN_LATENCY, CONN_TIMEOUT);
I have add a le_param_updated callback and print the update.
static void le_param_updated_cb(struct bt_conn *conn, uint16_t interval,
uint16_t latency, uint16_t timeout) {
printk("LE param updated: interval %u (ms) latency %u timeout %u ("
"ms)\n",
interval, latency, timeout);
}
I find that 10s after establishing a connection, I will get this:
LE param updated: interval 40 (ms) latency 0 timeout 42 (ms)
My question is: since the shorter interval works briefly, why do the devices renegotiate to 50 ms after a few seconds? Is there a recommended configuration (on either Central or Peripheral) to prevent this renegotiation and keep the connection interval at my requested value, so that the CTE packet rate can remain higher than 10 packets per second (i.e., higher than one per 100 ms)?
Best regards,
Cheng