How to set the conn param update request timeout

Hello,

I am working on an application (peripheral device) where a connection interval of 11.25ms with the central is essential. The desired behaviour is that if the central is not able to accept a connection interval request of 11.25ms, the peripheral device should drop the connection. I am using the following setup:

 

/* PPCP */
gap_conn_params.min_conn_interval = MSEC_TO_UNITS(11.25, UNIT_1_25_MS);
gap_conn_params.max_conn_interval = MSEC_TO_UNITS(11.25, UNIT_1_25_MS);
gap_conn_params.slave_latency = 0;
gap_conn_params.conn_sup_timeout = MSEC_TO_UNITS(1000, UNIT_10_MS);
err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
    
/* Conn params init */
ble_conn_params_init_t cp_init = { 0 };
cp_init.p_conn_params = NULL;
cp_init.first_conn_params_update_delay = APP_TIMER_TICKS(100);
cp_init.next_conn_params_update_delay = APP_TIMER_TICKS(2000);
cp_init.max_conn_params_update_count = 5;
cp_init.start_on_notify_cccd_handle = BLE_GATT_HANDLE_INVALID;
cp_init.disconnect_on_fail = true;
cp_init.evt_handler = on_conn_params_evt;
cp_init.error_handler = conn_params_error_handler;
err_code = ble_conn_params_init(&cp_init);

When I try to connect to my peripheral device using the nRF Connect for Dektop BLE application with the auto-accept update requests off and the connection interval set to 15ms, I am able to see the connection request coming back from the peripheral asking for 11.25ms. If I accept, all is well and good. If I reject, I see another request after 2s up to 5 times (as specified in the code above). If I reject each of the 5, the connection drops, as expected. It is the 3rd scenario of hitting "Ignore" that I am struggling with. When I hit ignore, the connection succeeds at 15ms and I can stream data from the peripheral. About ~60s later, I get a connection param update request from the peripheral. If I hit ignore again, the same behaviour continues up to 5 times, after which the connection finally drops. The problem is that between each requests, I can still stream data and my desired behaviour of 11.25ms or bust is not quite achieved.

This 60s timeout is what I am looking to set to something like 2s but am unable to find it in the code.

Here is a snippet from the Nordic SDK documentation that shows the timeout that I am talking about:

Does anyone know how I can set this timeout?

Parents Reply Children
No Data
Related