Reads gives NRF_ERROR_BUSY when central connects.

Hi

I have committed myself to building a central app that will be based on UART example replace an existing BLE soc that can no longer be found using the central.

My sensors have fixed characteristics and the handle customization. The available discovery mode cannot run during the process of connecting in order to save power. We have been trying to read info from the sensor after the BLE_GAP_EVT_CONNECTED event has been received but in vain.

I have also tried to read the information of the connect sensor’s characteristics as shown in the code below. The requests must have gone off the air when it was viewing the BLE sniffer and there was no any read response event displayed.

static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)

{

    ret_code_t            err_code;

    ble_gap_evt_t const * p_gap_evt = &p_ble_evt->evt.gap_evt;

    switch (p_ble_evt->header.evt_id)

    {

        case BLE_GAP_EVT_CONNECTED:

            // set the connection and characteristic handles.

            NRF_LOG_INFO("CONNECT HANDLE = %d", p_ble_evt->evt.gap_evt.conn_handle);

            //err_code = cble_nus_c_handles_assign(&m_ble_nus_c, p_ble_evt->evt.gap_evt.conn_handle);

            err_code = cble_nus_c_handles_assign(&m_ble_nus_c, p_ble_evt->evt.gap_evt.conn_handle);

            APP_ERROR_CHECK(err_code);

        

            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);

            APP_ERROR_CHECK(err_code);

            // start discovery of services. The NUS Client waits for a discovery result

           //err_code = ble_db_discovery_start(&m_db_disc, p_ble_evt->evt.gap_evt.conn_handle);

           //APP_ERROR_CHECK(err_code);

           //cble_nus_c_read_sensor(&m_ble_nus_c);

            //cble_nus_c_StartPwAuthenticate(&m_ble_nus_c);sd_ble_gattc_read

            NRF_LOG_DEBUG("SEND READ TO HANDLE, CHAR HANDLE %d, %d", p_ble_evt->evt.gap_evt.conn_handle,(uint16_t)BLE_HANDLE_MSENSE_SENSOR_CHARACTERISTIC);

            do{ 

             NRF_LOG_DEBUG("RETRY % %d", err_code);  

             err_code = sd_ble_gattc_read(p_ble_evt->evt.gap_evt.conn_handle,

                                           (uint16_t)BLE_HANDLE_MSENSE_SENSOR_CHARACTERISTIC,

                                            0);

           }while(err_code == NRF_ERROR_BUSY);

            //

Thank you

Related