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

nrf_cli_init is returning Error code 4

Hi I am using nRF52832 .My application acts as central and Peripheral at the same time.

board acting as Central: scans and connect to peripherals without any error.

But when board advertises and another central device try to connect i am getting error code 4.

code: inside ble_event_handler i have this case.

case BLE_GAP_EVT_CONNECTED:

        {

            NRF_LOG_INFO("Connected.");

            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);

            APP_ERROR_CHECK(err_code);

            m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;

            err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);

            APP_ERROR_CHECK(err_code);

          

            nrf_cli_ble_uart_config_t config = { .conn_handle = m_conn_handle };

 

            err_code = nrf_cli_init(&m_ble_cli, &config, true, true, NRF_LOG_SEVERITY_INFO);

            APP_ERROR_CHECK(nrf_cli_task_create(&m_ble_cli));

            NRF_LOG_INFO("error code after connection = %d\n", err_code); // Error occured here

 

            APP_ERROR_CHECK(err_code);

Parents Reply Children
Related