mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
NimBLE : Change GATT notify/indicate from gattc to gatts
This commit is contained in:
parent
c3d3ee8767
commit
b1d87a41d2
@ -433,7 +433,7 @@ void esp_blufi_send_notify(void *arg)
|
|||||||
struct os_mbuf *om;
|
struct os_mbuf *om;
|
||||||
om = ble_hs_mbuf_from_flat(pkts->pkt, pkts->pkt_len);
|
om = ble_hs_mbuf_from_flat(pkts->pkt, pkts->pkt_len);
|
||||||
int rc = 0;
|
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);
|
assert(rc == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1253,7 +1253,7 @@ int bt_mesh_gatts_notify(struct bt_mesh_conn *conn,
|
|||||||
|
|
||||||
om = ble_hs_mbuf_from_flat(data, len);
|
om = ble_hs_mbuf_from_flat(data, len);
|
||||||
assert(om);
|
assert(om);
|
||||||
ble_gattc_notify_custom(conn_id, attr->handle, om);
|
ble_gatts_notify_custom(conn_id, attr->handle, om);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ void ble_server_uart_task(void *pvParameters){
|
|||||||
if (connection_handle[i] != 0) {
|
if (connection_handle[i] != 0) {
|
||||||
struct os_mbuf *txom;
|
struct os_mbuf *txom;
|
||||||
txom = ble_hs_mbuf_from_flat(ntf, sizeof(ntf));
|
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,
|
ble_spp_svc_gatt_read_val_handle,
|
||||||
txom);
|
txom);
|
||||||
if ( rc == 0 ) {
|
if ( rc == 0 ) {
|
||||||
|
@ -173,7 +173,7 @@ blehr_tx_hrate(TimerHandle_t ev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
om = ble_hs_mbuf_from_flat(hrm, sizeof(hrm));
|
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);
|
assert(rc == 0);
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ notify_task(void *arg)
|
|||||||
assert(om != NULL);
|
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) {
|
if (rc != 0) {
|
||||||
ESP_LOGE(tag, "Error while sending notification; rc = %d", rc);
|
ESP_LOGE(tag, "Error while sending notification; rc = %d", rc);
|
||||||
notify_count -= 1;
|
notify_count -= 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user