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

BLE_GATTC_EVT_READ_RSP does not occur in ble_cts_c_on_ble_evt.

I am trying to read the current time using CTS. I used the example source provided by nordic. However
BLE_GATTC_EVT_READ_RSP does not occur in ble_cts_c_on_ble_evt.

BLE_CTS_C_EVT_DISCOVERY_COMPLETE occurred in on_cts_c_evt and processed as below (as in the example source ...)

static void on_cts_c_evt(ble_cts_c_t * p_cts, ble_cts_c_evt_t * p_evt)
{
    ret_code_t err_code;

    switch (p_evt->evt_type)
    {
        case BLE_CTS_C_EVT_DISCOVERY_COMPLETE:
            err_code = ble_cts_c_handles_assign(&m_cts_c,
                                                p_evt->conn_handle,
                                                &p_evt->params.char_handles);
            APP_ERROR_CHECK(err_code);
            break;

        case BLE_CTS_C_EVT_DISCOVERY_FAILED:
			//Current Time Service not found on server.
            break;

        case BLE_CTS_C_EVT_DISCONN_COMPLETE:
			//Disconnect Complete.
            break;

        case BLE_CTS_C_EVT_CURRENT_TIME:
			//Current Time received.
            //현재 시간 세팅
            CurrentTimeSetting(p_evt);
			
            break;

        case BLE_CTS_C_EVT_INVALID_TIME:
			//Invalid Time received.
            break;

        default:
            break;
    }
}

Related