diff --git a/components/bt/host/bluedroid/api/esp_gattc_api.c b/components/bt/host/bluedroid/api/esp_gattc_api.c index c8da7bcec1..433c057362 100644 --- a/components/bt/host/bluedroid/api/esp_gattc_api.c +++ b/components/bt/host/bluedroid/api/esp_gattc_api.c @@ -330,6 +330,7 @@ esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if, uint16_t conn_id, uint16_t handle, esp_gatt_auth_req_t auth_req) { + printf("Inside esp_ble_gattc_read_char\n"); btc_msg_t msg; btc_ble_gattc_args_t arg; @@ -432,6 +433,7 @@ esp_err_t esp_ble_gattc_write_char(esp_gatt_if_t gattc_if, arg.write_char.write_type = write_type; arg.write_char.auth_req = auth_req; + esp_ble_gattc_read_char(gattc_if, conn_id, handle, auth_req); return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), btc_gattc_arg_deep_copy) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL); } diff --git a/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c b/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c index e53d85d338..1c811edfc6 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c @@ -298,6 +298,9 @@ static void gattc_profile_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_ esp_log_buffer_hex(GATTC_TAG, bda, sizeof(esp_bd_addr_t)); break; } + case ESP_GATTC_READ_CHAR_EVT: + ESP_LOGI(GATTC_TAG, "ESP_GATTC_READ_CHAR_EVT called."); + break; case ESP_GATTC_WRITE_CHAR_EVT: if (p_data->write.status != ESP_GATT_OK){ ESP_LOGE(GATTC_TAG, "write char failed, error status = %x", p_data->write.status);