From b950ddb0fd8d423c1f9d8eed51f0777d362719d7 Mon Sep 17 00:00:00 2001 From: "isha.pardikar@espressif.com" Date: Mon, 31 Oct 2022 15:53:30 +0530 Subject: [PATCH] NimBLE : Change GATT notify/indicate from gattc to gatts --- .../bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c | 2 +- .../bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c | 2 +- components/bt/host/nimble/nimble | 2 +- examples/bluetooth/nimble/ble_spp/spp_server/main/main.c | 2 +- examples/bluetooth/nimble/blehr/main/main.c | 2 +- .../nimble/throughput_app/bleprph_throughput/main/main.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c b/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c index 33fa0bfb4f..c8f397c4b6 100644 --- a/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c +++ b/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c @@ -432,7 +432,7 @@ void esp_blufi_send_notify(void *arg) struct os_mbuf *om; om = ble_hs_mbuf_from_flat(pkts->pkt, pkts->pkt_len); int rc = 0; - rc = ble_gattc_notify_custom(blufi_env.conn_id, gatt_values[1].val_handle, om); + rc = ble_gatts_notify_custom(blufi_env.conn_id, gatt_values[1].val_handle, om); assert(rc == 0); } diff --git a/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c b/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c index c7603f0647..96dedbeb5d 100644 --- a/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c +++ b/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c @@ -1253,7 +1253,7 @@ int bt_mesh_gatts_notify(struct bt_mesh_conn *conn, om = ble_hs_mbuf_from_flat(data, len); assert(om); - ble_gattc_notify_custom(conn_id, attr->handle, om); + ble_gatts_notify_custom(conn_id, attr->handle, om); return 0; } diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 63b114e944..fc0bd89a36 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 63b114e9441b74fad228e082e6170a59194623b0 +Subproject commit fc0bd89a364f96f091e0c70d7fc53aaf17b696ee diff --git a/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c b/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c index 0c040761c0..36b8753f56 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c +++ b/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c @@ -343,7 +343,7 @@ void ble_server_uart_task(void *pvParameters){ if (connection_handle[i] != 0) { struct os_mbuf *txom; txom = ble_hs_mbuf_from_flat(ntf, sizeof(ntf)); - rc = ble_gattc_notify_custom(connection_handle[i], + rc = ble_gatts_notify_custom(connection_handle[i], ble_spp_svc_gatt_read_val_handle, txom); if ( rc == 0 ) { diff --git a/examples/bluetooth/nimble/blehr/main/main.c b/examples/bluetooth/nimble/blehr/main/main.c index deea67fc7e..77eef26ca7 100644 --- a/examples/bluetooth/nimble/blehr/main/main.c +++ b/examples/bluetooth/nimble/blehr/main/main.c @@ -173,7 +173,7 @@ blehr_tx_hrate(TimerHandle_t ev) } om = ble_hs_mbuf_from_flat(hrm, sizeof(hrm)); - rc = ble_gattc_notify_custom(conn_handle, hrs_hrm_handle, om); + rc = ble_gatts_notify_custom(conn_handle, hrs_hrm_handle, om); assert(rc == 0); diff --git a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c index 3631ae1df8..3a29f94eb4 100644 --- a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c +++ b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c @@ -194,7 +194,7 @@ notify_task(void *arg) assert(om != NULL); } - rc = ble_gattc_notify_custom(conn_handle, notify_handle, om); + rc = ble_gatts_notify_custom(conn_handle, notify_handle, om); if (rc != 0) { ESP_LOGE(tag, "Error while sending notification; rc = %d", rc); notify_count -= 1;