Skip to content

Commit

Permalink
Merge branch 'bugfix/notify_gattc_to_gatts_v5.0' into 'release/v5.0'
Browse files Browse the repository at this point in the history
NimBLE : Change GATT notify/indicate from gattc to gatts (v5.0)

See merge request espressif/esp-idf!20892
  • Loading branch information
jack0c committed Dec 8, 2022
2 parents d4ff9f1 + b1d87a4 commit 2693c89
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/bluetooth/nimble/ble_spp/spp_server/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion examples/bluetooth/nimble/blehr/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2693c89

Please sign in to comment.