From ec374548a4089e4524ebaede5952e79d06730892 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Fri, 28 Feb 2014 11:23:56 +0100 Subject: [PATCH] android/hal-gatt-api: Add Client Notify event --- android/hal-ipc-api.txt | 12 ++++++++++++ android/hal-msg.h | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt index a5b6cd802..6ee8e9e8a 100644 --- a/android/hal-ipc-api.txt +++ b/android/hal-ipc-api.txt @@ -1878,6 +1878,18 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID) Valid GATT Char. ID: As described in Get Characteristic Opcode 0x8b - Notify notification + + Notification parameters: Connection ID (4 octets) + Notify Parameters (variable) + Valid Notify Parameters: Address (6 octets) + GATT Service ID (18 octets) + GATT Char. ID (17 octets) + Is Notify (1 octet) + Length (2 octets) + Value (variable) + Valid Service ID: As described in Get Characteristic + Valid GATT Char. ID: As described in Get Characteristic + Opcode 0x8c - Read Characteristic notification Opcode 0x8d - Write Characteristic notification Opcode 0x8e - Read Descriptor notification diff --git a/android/hal-msg.h b/android/hal-msg.h index 3f57c772c..522596bc9 100644 --- a/android/hal-msg.h +++ b/android/hal-msg.h @@ -1302,3 +1302,18 @@ struct hal_ev_gatt_client_reg_for_notif { struct hal_gatt_srvc_id srvc_id; struct hal_gatt_gatt_id char_id; } __attribute__((packed)); + +#define HAL_EV_GATT_CLIENT_NOTIFY 0x8b +struct hal_gatt_notify_params { + uint8_t bda[6]; + struct hal_gatt_srvc_id srvc_id; + struct hal_gatt_gatt_id char_id; + uint8_t is_notify; + uint16_t len; + uint8_t value[0]; +} __attribute__((packed)); + +struct hal_ev_gatt_client_notify { + int32_t conn_id; + struct hal_gatt_notify_params data; +} __attribute__((packed)); -- 2.47.3