diff --git a/drivers/nble/gatt.c b/drivers/nble/gatt.c index fe41c61a328..573f79b41c1 100644 --- a/drivers/nble/gatt.c +++ b/drivers/nble/gatt.c @@ -348,7 +348,14 @@ int bt_gatt_attr_read_cpf(struct bt_conn *conn, int bt_gatt_notify(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *data, uint16_t len) { - return -ENOSYS; + struct ble_gatt_send_notif_ind_params notif; + + notif.conn_handle = 0xFFFF; + notif.params.attr = (struct bt_gatt_attr *)attr; + notif.params.offset = 0; + + ble_gatt_send_notif_req(¬if, (uint8_t *)data, len); + return 0; } int bt_gatt_exchange_mtu(struct bt_conn *conn, bt_gatt_rsp_func_t func) diff --git a/drivers/nble/gatt_internal.h b/drivers/nble/gatt_internal.h index bf6d359faca..1a017fee399 100644 --- a/drivers/nble/gatt_internal.h +++ b/drivers/nble/gatt_internal.h @@ -122,7 +122,7 @@ struct ble_gatts_rw_reply_params { * Notification/Indication parameters */ struct ble_gatt_notif_ind_params { - uint16_t val_handle; + struct bt_gatt_attr *attr; uint16_t offset; }; @@ -131,6 +131,7 @@ struct ble_gatt_notif_ind_params { */ struct ble_gatt_send_notif_ind_params { + void *cback; uint16_t conn_handle; struct ble_gatt_notif_ind_params params; };