From b1d87a41d2dd13f39f65466f96560ccb8ad9e0b8 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 +- 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 +- 5 files changed, 5 insertions(+), 5 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 ca5bb0b4b5..6c50889756 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 @@ -433,7 +433,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(conn_handle, gatt_values[1].val_handle, om); + rc = ble_gatts_notify_custom(conn_handle, 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/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;