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

Multiple Connection Parameter Updates

I'm trying to add a feature where my peripheral will temporarily trigger a Faster Connection Parameter for a period of time determined by an app_timer. However it seems that the FIRST_CONN_PARAMS_UPDATE_DELAY parameter set during ble_conn_params_init() keeps overriding the Fast Connection Parameter updates and returns to Slow Params prematurely. Is there anyways to avoid this override so I can independently set up Fast connection parameters, and then reset then after an app_timer times out?

Also I noted that even though my Connection Parameters update successfully, I cannot change them again for quite awhile. Each attempt simply returns an NRF_BUSY.

Thanks

DC

Parents
  • It seems to me that you should not use the standard connection parameter handler, but implement your own. You can keep the ble_conn_params_init() function in main() as this sets up the preferred parameters, but remove the event handler ble_conn_params_on_ble_evt from ble_evt_dispatch. Take a look inside ble_conn_params.c to see what the handler did. You must now handle events like BLE_GAP_EVT_CONN_PARAM_UPDATE yourself.

    For the NRF_BUSY return code: This is returned because you have not received a response from the central on you previous request. See the sequence chart for connection parameter update.

Reply
  • It seems to me that you should not use the standard connection parameter handler, but implement your own. You can keep the ble_conn_params_init() function in main() as this sets up the preferred parameters, but remove the event handler ble_conn_params_on_ble_evt from ble_evt_dispatch. Take a look inside ble_conn_params.c to see what the handler did. You must now handle events like BLE_GAP_EVT_CONN_PARAM_UPDATE yourself.

    For the NRF_BUSY return code: This is returned because you have not received a response from the central on you previous request. See the sequence chart for connection parameter update.

Children
Related