How to maximize Conn CTE packet rate on nRF5340?

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

Parents Reply Children
  • Hi,
    Thanks you! I tried this parameter and it worked. I really appreciate it!

    I have one more question about the CTE update frequency. I noticed that when I set the BLE connection interval to 50 ms, I don’t receive a CTE extension packet every 50 ms. Instead, it looks like the SDK requests a CTE in one connection event, and the peripheral sends the CTE in the next event.

    Is it possible to configure it so that the CTE request and the CTE transmission happen within the same connection event each time? If so, then with a 50 ms interval the central should be able to receive a CTE every 50 ms.

  • Hi,

    I am sorry for the delays. We are looking into your latest question about CTE happening every other connection interval. Which BLE controller are you using, the SoftDevice Controller or the Zephyr controller?

    Regards,
    Terje

  • Hi tesc,

    No need to apologize—no worries. This forum isn’t an instant-messaging tool.

    I’m using Nordic’s sample:
    https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/direction_finding_central

    I use an nRF5340 as the central, and an nRF54L15 and nRF5340 as peripherals.

    In this program, the CTE interval is specified by bt_df_conn_cte_req_params. The interval field is described as: if set to 0, the CTE runs only once; if non-zero, it runs periodically with the configured interval. Therefore, the minimum value I can set is 1. From my observations, this means I receive one CTE packet every 1 connection interval.

    As far as I understand, connection-based CTE should be able to complete the request and the CTE response within a single connection interval. In other words, when I set the connection interval to 10 ms, I would like to receive one CTE every 10 ms; however, with the current configuration, I can only receive a CTE at best every 20 ms. Is this a limitation of the SDK, or a limitation of the BLE specification?

    Best,
    Cheng

  • Hi,

    cheng said:
    Is this a limitation of the SDK, or a limitation of the BLE specification?

    As is, the SoftDevice Controller responds with LL_CTE_RSP on the next connection event, not the current one. This has to do with implications for the complexity of the scheduler. According to the Bluetooth specification, the response to a link layer procedure can be sent in either the same or during a later connection event. Hence the delay is not a limitation of the specification, but implementation specific to the SoftDevice Controller. This does mean one connection event of latency compared to the maximum possible according to the specification, but it is at the same time well within the specifications.

    Further, also according to the Bluetooth specification, the CTE_Request_Interval parameter, which is what is set here for the device requesting CTE, is a suggestion (not a hard requirement). In the case of periodic operation (non-zero value), "the procedure is initiated every CTE_Request_Interval. However, the Controller may delay initiating the procedure beyond the requested interval (e.g., in order to prioritize other activities.)" Ref. Vol 4, Part E, 7.8.85 LE Connection CTE Request Enable command.

    From what I can tell the SoftDevice Controller implementation will send requests every connection event as requested (to the extent allowed by the Bluetooth specification with respect to overlapping procedures etc.) This means the SoftDevice Controller as a requester acts as quickly as permitted by the Bluetooth specification, and as a responder responds on the following connection event.

    Regards,
    Terje

  • Thanks! Now I understand where its limitations come from.

Related