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

conn_params_error_handler() after 3rd connection

Hi,

I'm trying to write my own application based on the ble_lbs example on nrf51822. Recently I've discovered a problem with reconnection to the beacon. I can successfully make two cycles of connect and disconnect. When I try to connect for the third time, the application calls APP_ERROR_HANDLER from conn_params_error_handler.

Is this a problem with connection params initialization?

static void conn_params_init(void)
{

uint32_t               err_code;
ble_conn_params_init_t cp_init;

memset(&cp_init, 0, sizeof(cp_init));

cp_init.p_conn_params                  = NULL;
cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY;
cp_init.next_conn_params_update_delay  = NEXT_CONN_PARAMS_UPDATE_DELAY;
cp_init.max_conn_params_update_count   = MAX_CONN_PARAMS_UPDATE_COUNT;
cp_init.start_on_notify_cccd_handle    = BLE_GATT_HANDLE_INVALID;
cp_init.disconnect_on_fail             = false;//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);
APP_ERROR_CHECK(err_code);
}

Best regards, Konrad

Parents Reply Children
Related