From 4efacd3d5b3c968ac1a1106ec1f288d0115bc42c Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 5 Feb 2016 15:02:05 +0200 Subject: [PATCH] drivers/nble: Sync ble_gatt_notif_ind_rsp definition The definition is not in sync with firmware which cause the following error: bt: rpc_deserialize (0xa8008a24): on_ble_gatts_send_notif_ind_rsp panic: errcode -1 Change-Id: Iddaa1eece7c43b5707c01db6e053d104a2a846e6 Signed-off-by: Luiz Augusto von Dentz --- drivers/nble/gatt.c | 2 +- drivers/nble/gatt_internal.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/nble/gatt.c b/drivers/nble/gatt.c index 71d23d2a377..4eceab1af1d 100644 --- a/drivers/nble/gatt.c +++ b/drivers/nble/gatt.c @@ -486,7 +486,7 @@ void on_ble_gatts_read_evt(const struct nble_gatt_rd_evt *evt) attr = evt->attr; - BT_DBG("read %p", attr); + BT_DBG("handle %p", attr); if (attr->read) { reply_data.status = attr->read(NULL, attr, data, sizeof(data), diff --git a/drivers/nble/gatt_internal.h b/drivers/nble/gatt_internal.h index 2fb387affec..a2d9cd687db 100644 --- a/drivers/nble/gatt_internal.h +++ b/drivers/nble/gatt_internal.h @@ -141,10 +141,12 @@ enum ble_gatts_notif_ind_type { }; struct ble_gatt_notif_ind_rsp { + /**< Callback function to call on reception of this message */ + bt_gatt_notify_func_t cback; int status; /**< Status of the operation. */ /**< Connection handle, can be 0xFFFF if value change broadcast */ uint16_t conn_handle; - uint16_t handle; /**< Characteristic value handle */ + struct bt_gatt_attr *attr; /**< GATT Attribute */ /**< MSG_ID_BLE_GATTS_SEND_NOTIF_RSP for notification or * MSG_ID_BLE_GATTS_SEND_IND_RSP for indication */