2014-02-28 10:23:46

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 01/18] android/hal-gatt-api: Add Client Register event

---
android/hal-ipc-api.txt | 5 +++++
android/hal-msg.h | 7 +++++++
2 files changed, 12 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 1a19c80..58c05a9 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1797,6 +1797,11 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
In case of an error, the error response will be returned.

Opcode 0x81 - Register Client notification
+
+ Notification parameters: Status (4 octets)
+ Client Interface (4 octets)
+ UUID (16 octets)
+
Opcode 0x82 - Scan Result notification
Opcode 0x83 - Connect Device notification
Opcode 0x84 - Disconnect Device notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index bde9717..9f7f9e9 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1236,3 +1236,10 @@ struct hal_ev_avrcp_passthrough_cmd {
uint8_t id;
uint8_t state;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_REGISTER_CLIENT 0x81
+struct hal_ev_gatt_client_register_client {
+ int32_t status;
+ int32_t client_if;
+ uint8_t app_uuid[16];
+} __attribute__((packed));
--
1.9.0



2014-02-28 10:24:03

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 18/18] android/hal-gatt-api: Add Client Listen event

---
android/hal-ipc-api.txt | 3 +++
android/hal-msg.h | 6 ++++++
2 files changed, 9 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 5f2561a..04c0b7c 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1946,6 +1946,9 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)

Opcode 0x92 - Listen notification

+ Notification parameters: Status (4 octets)
+ Server Interface (4 octets)
+
Opcode 0x93 - Register Server notification
Opcode 0x94 - Connection notification
Opcode 0x95 - Service Added notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index b7c351d..95ce551 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1392,3 +1392,9 @@ struct hal_ev_gatt_client_read_remote_rssi {
int32_t rssi;
int32_t status;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_LISTEN 0x92
+struct hal_ev_gatt_client_listen {
+ int32_t status;
+ int32_t server_if;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:24:02

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 17/18] android/hal-gatt-api: Add Client Read Remote RSSI event

---
android/hal-ipc-api.txt | 6 ++++++
android/hal-msg.h | 8 ++++++++
2 files changed, 14 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 0a269b2..5f2561a 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1938,6 +1938,12 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Status (4 octets)

Opcode 0x91 - Read Remote RSSI notification
+
+ Notification parameters: Client (4 octets)
+ Address (6 octets)
+ RSSI (4 octets)
+ Status (4 octets)
+
Opcode 0x92 - Listen notification

Opcode 0x93 - Register Server notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 8c8e3fa..b7c351d 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1384,3 +1384,11 @@ struct hal_ev_gatt_client_exec_write {
int32_t conn_id;
int32_t status;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_READ_REMOTE_RSSI 0x91
+struct hal_ev_gatt_client_read_remote_rssi {
+ int32_t client_if;
+ uint8_t address[6];
+ int32_t rssi;
+ int32_t status;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:24:01

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 16/18] android/hal-gatt-api: Add Client Exec Write event

---
android/hal-ipc-api.txt | 4 ++++
android/hal-msg.h | 6 ++++++
2 files changed, 10 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 0b1fb7d..0a269b2 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1933,6 +1933,10 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Valid GATT Write Parameters: As described in Write Characteristic

Opcode 0x90 - Execute Write notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+
Opcode 0x91 - Read Remote RSSI notification
Opcode 0x92 - Listen notification

diff --git a/android/hal-msg.h b/android/hal-msg.h
index b3d5fd2..8c8e3fa 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1378,3 +1378,9 @@ struct hal_ev_gatt_client_write_descriptor {
int32_t status;
struct hal_gatt_write_params data;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_EXEC_WRITE 0x90
+struct hal_ev_gatt_client_exec_write {
+ int32_t conn_id;
+ int32_t status;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:24:00

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 15/18] android/hal-gatt-api: Add Client Write Descriptor event

---
android/hal-ipc-api.txt | 6 ++++++
android/hal-msg.h | 7 +++++++
2 files changed, 13 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index a1852a6..0b1fb7d 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1926,6 +1926,12 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Valid GATT Read Parameters: As described in Read Characteristic

Opcode 0x8f - Write Descriptor notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Write Parameters (53 octets)
+ Valid GATT Write Parameters: As described in Write Characteristic
+
Opcode 0x90 - Execute Write notification
Opcode 0x91 - Read Remote RSSI notification
Opcode 0x92 - Listen notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 3bf9c68..b3d5fd2 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1371,3 +1371,10 @@ struct hal_ev_gatt_client_read_descriptor {
int32_t status;
struct hal_gatt_read_params data;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_WRITE_DESCRIPTOR 0x8f
+struct hal_ev_gatt_client_write_descriptor {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_write_params data;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:59

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 14/18] android/hal-gatt-api: Add Client Read Descriptor event

---
android/hal-ipc-api.txt | 6 ++++++
android/hal-msg.h | 7 +++++++
2 files changed, 13 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 1ce350d..a1852a6 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1919,6 +1919,12 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Valid GATT Char. & Decr. ID: As described in Get Descriptor

Opcode 0x8e - Read Descriptor notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Read Parameters (variable)
+ Valid GATT Read Parameters: As described in Read Characteristic
+
Opcode 0x8f - Write Descriptor notification
Opcode 0x90 - Execute Write notification
Opcode 0x91 - Read Remote RSSI notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index c6d9ab4..3bf9c68 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1364,3 +1364,10 @@ struct hal_ev_gatt_client_write_characteristic {
int32_t status;
struct hal_gatt_write_params data;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_READ_DESCRIPTOR 0x8e
+struct hal_ev_gatt_client_read_descriptor {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_read_params data;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:58

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 13/18] android/hal-gatt-api: Add Client Write Characteristic event

---
android/hal-ipc-api.txt | 11 +++++++++++
android/hal-msg.h | 14 ++++++++++++++
2 files changed, 25 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 0d76967..1ce350d 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1907,6 +1907,17 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Value (variable)

Opcode 0x8d - Write Characteristic notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Write Parameters (53 octets)
+ Valid GATT Write Parameters: GATT Service ID (18 octets)
+ GATT Characteristic ID (17 octets)
+ GATT Description ID (17 octets)
+ Status (1 octet)
+ Valid GATT Service ID: As described in Get Descriptor
+ Valid GATT Char. & Decr. ID: As described in Get Descriptor
+
Opcode 0x8e - Read Descriptor notification
Opcode 0x8f - Write Descriptor notification
Opcode 0x90 - Execute Write notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index fe87836..c6d9ab4 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1350,3 +1350,17 @@ struct hal_ev_gatt_client_read_characteristic {
int32_t status;
struct hal_gatt_read_params data;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_WRITE_CHARACTERISTIC 0x8d
+struct hal_gatt_write_params {
+ struct hal_gatt_srvc_id srvc_id;
+ struct hal_gatt_gatt_id char_id;
+ struct hal_gatt_gatt_id descr_id;
+ uint8_t status;
+} __attribute__((packed));
+
+struct hal_ev_gatt_client_write_characteristic {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_write_params data;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:57

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 12/18] android/hal-gatt-api: Add Client Read Characteristic event

---
android/hal-ipc-api.txt | 15 +++++++++++++++
android/hal-msg.h | 21 +++++++++++++++++++++
2 files changed, 36 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 6ee8e9e..0d76967 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1891,6 +1891,21 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Valid GATT Char. ID: As described in Get Characteristic

Opcode 0x8c - Read Characteristic notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Read Parameters (variable)
+ Valid GATT Read Parameters: GATT Service ID (18 octets)
+ GATT Char. ID (17 octets)
+ GATT Descr. ID (17 octets)
+ Value Type (4 octets)
+ Status (1 octet)
+ Unformatted Value (variable)
+ Valid GATT Service ID: As described in Get Characteristic
+ Valid GATT Char. & Decr. ID: As described in Get Descriptor
+ Valid Unformatted Value: Length (2 octets)
+ Value (variable)
+
Opcode 0x8d - Write Characteristic notification
Opcode 0x8e - Read Descriptor notification
Opcode 0x8f - Write Descriptor notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index a089378..fe87836 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1329,3 +1329,24 @@ struct hal_ev_gatt_client_notify {
int32_t conn_id;
struct hal_gatt_notify_params data;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_READ_CHARACTERISTIC 0x8c
+struct hal_gatt_unformated_value {
+ uint16_t len;
+ uint8_t value[0];
+} __attribute__((packed));
+
+struct hal_gatt_read_params {
+ struct hal_gatt_srvc_id srvc_id;
+ struct hal_gatt_gatt_id char_id;
+ struct hal_gatt_gatt_id descr_id;
+ uint8_t status;
+ uint16_t value_type;
+ struct hal_gatt_unformated_value value;
+} __attribute__((packed));
+
+struct hal_ev_gatt_client_read_characteristic {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_read_params data;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:56

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 11/18] 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 a5b6cd8..6ee8e9e 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 356a9a2..a089378 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1314,3 +1314,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));
--
1.9.0


2014-02-28 10:23:55

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 10/18] android/hal-gatt-api: Add Client Register for Notification event

---
android/hal-ipc-api.txt | 9 +++++++++
android/hal-msg.h | 9 +++++++++
2 files changed, 18 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 362f50f..a5b6cd8 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1868,6 +1868,15 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Valid GATT Service & Incl. Service ID: As described in Search Result

Opcode 0x8a - Register For Notification notification
+
+ Notification parameters: Connection ID (4 octets)
+ Registered (4 octets)
+ Status (4 octets)
+ GATT Service ID (18 octets)
+ GATT Char. ID (17 octets)
+ Valid GATT Service ID: As described in Get Characteristic
+ Valid GATT Char. ID: As described in Get Characteristic
+
Opcode 0x8b - Notify notification
Opcode 0x8c - Read Characteristic notification
Opcode 0x8d - Write Characteristic notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 642704c..356a9a2 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1305,3 +1305,12 @@ struct hal_ev_gatt_client_get_inc_service {
struct hal_gatt_srvc_id srvc_id;
struct hal_gatt_srvc_id incl_srvc_id;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_REGISTER_FOR_NOTIF 0x8a
+struct hal_ev_gatt_client_reg_for_notif {
+ int32_t conn_id;
+ int32_t registered;
+ int32_t status;
+ struct hal_gatt_srvc_id srvc_id;
+ struct hal_gatt_gatt_id char_id;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:54

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 09/18] android/hal-gatt-api: Add Client Get Included Service event

---
android/hal-ipc-api.txt | 7 +++++++
android/hal-msg.h | 8 ++++++++
2 files changed, 15 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index b004200..362f50f 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1860,6 +1860,13 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Instance ID (1 octet)

Opcode 0x89 - Get Included Service notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Service ID (18 octets)
+ GATT Incl. Service ID (18 octets)
+ Valid GATT Service & Incl. Service ID: As described in Search Result
+
Opcode 0x8a - Register For Notification notification
Opcode 0x8b - Notify notification
Opcode 0x8c - Read Characteristic notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 033d4c4..642704c 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1297,3 +1297,11 @@ struct hal_ev_gatt_client_get_descriptor {
struct hal_gatt_gatt_id char_id;
struct hal_gatt_gatt_id descr_id;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_GET_INC_SERVICE 0X89
+struct hal_ev_gatt_client_get_inc_service {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_srvc_id srvc_id;
+ struct hal_gatt_srvc_id incl_srvc_id;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:53

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 08/18] android/hal-gatt-api: Add Client Get Descriptor event

---
android/hal-ipc-api.txt | 10 ++++++++++
android/hal-msg.h | 9 +++++++++
2 files changed, 19 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index c98c2ba..b004200 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1849,6 +1849,16 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Instance ID (1 octet)

Opcode 0x88 - Get Descriptor notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Service ID (18 octets)
+ GATT Char. ID (17 octets)
+ GATT Descr. ID (17 octets)
+ Valid GATT Service & Char. ID: As described in Get Characteristic
+ Valid GATT Descr. ID: UUID (16 octets)
+ Instance ID (1 octet)
+
Opcode 0x89 - Get Included Service notification
Opcode 0x8a - Register For Notification notification
Opcode 0x8b - Notify notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 148bd44..033d4c4 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1288,3 +1288,12 @@ struct hal_ev_gatt_client_get_characteristic {
struct hal_gatt_gatt_id char_id;
int32_t char_prop;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_GET_DESCRIPTOR 0x88
+struct hal_ev_gatt_client_get_descriptor {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_srvc_id srvc_id;
+ struct hal_gatt_gatt_id char_id;
+ struct hal_gatt_gatt_id descr_id;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:51

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 06/18] android/hal-gatt-api: Add Client Search Result event

---
android/hal-ipc-api.txt | 8 ++++++++
android/hal-msg.h | 6 ++++++
2 files changed, 14 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 9a83ad6..fd2adac 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1829,6 +1829,14 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Status (4 octets)

Opcode 0x86 - Search Result notification
+
+ Notification parameters: Connection ID (4 octets)
+ GATT Service ID (18 octets)
+ Valid GATT Service ID: GATT ID (17 octets)
+ Is Primary (1 octet)
+ Valid GATT ID: UUID (16 octets)
+ Instance ID (1 octet)
+
Opcode 0x87 - Get Characteristic notification
Opcode 0x88 - Get Descriptor notification
Opcode 0x89 - Get Included Service notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index abbc0c7..daea6ed 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1273,3 +1273,9 @@ struct hal_ev_gatt_client_search_complete {
int32_t conn_id;
int32_t status;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_SEARCH_RESULT 0x86
+struct hal_ev_gatt_client_search_result {
+ int32_t conn_id;
+ struct hal_gatt_srvc_id srvc_id;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:49

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 04/18] android/hal-gatt-api: Add Client Disconnect event

---
android/hal-ipc-api.txt | 6 ++++++
android/hal-msg.h | 8 ++++++++
2 files changed, 14 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 2570023..09916b2 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1817,6 +1817,12 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Address (6 octets)

Opcode 0x84 - Disconnect Device notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ Client Interface (4 octets)
+ Address (6 octets)
+
Opcode 0x85 - Search Complete notification
Opcode 0x86 - Search Result notification
Opcode 0x87 - Get Characteristic notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 8f781e9..42badb5 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1259,3 +1259,11 @@ struct hal_ev_gatt_client_connect {
int32_t client_if;
uint8_t bda[6];
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_DISCONNECT 0x84
+struct hal_ev_gatt_client_disconnect {
+ int32_t conn_id;
+ int32_t status;
+ int32_t client_if;
+ uint8_t bda[6];
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:50

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 05/18] android/hal-gatt-api: Add Client Search Complete event

---
android/hal-ipc-api.txt | 4 ++++
android/hal-msg.h | 6 ++++++
2 files changed, 10 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 09916b2..9a83ad6 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1824,6 +1824,10 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Address (6 octets)

Opcode 0x85 - Search Complete notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+
Opcode 0x86 - Search Result notification
Opcode 0x87 - Get Characteristic notification
Opcode 0x88 - Get Descriptor notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 42badb5..abbc0c7 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1267,3 +1267,9 @@ struct hal_ev_gatt_client_disconnect {
int32_t client_if;
uint8_t bda[6];
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_SEARCH_COMPLETE 0x85
+struct hal_ev_gatt_client_search_complete {
+ int32_t conn_id;
+ int32_t status;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:48

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 03/18] android/hal-gatt-api: Add Client Connect event

---
android/hal-ipc-api.txt | 6 ++++++
android/hal-msg.h | 8 ++++++++
2 files changed, 14 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index ab9cbc5..2570023 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1810,6 +1810,12 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Data (variable)

Opcode 0x83 - Connect Device notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ Client Interface (4 octets)
+ Address (6 octets)
+
Opcode 0x84 - Disconnect Device notification
Opcode 0x85 - Search Complete notification
Opcode 0x86 - Search Result notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 1dad9e1..8f781e9 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1251,3 +1251,11 @@ struct hal_ev_gatt_client_scan_result {
uint16_t len;
uint8_t adv_data[0];
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_CONNECT 0x83
+struct hal_ev_gatt_client_connect {
+ int32_t conn_id;
+ int32_t status;
+ int32_t client_if;
+ uint8_t bda[6];
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:52

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 07/18] android/hal-gatt-api: Add Client Get Characteristic event

---
android/hal-ipc-api.txt | 10 ++++++++++
android/hal-msg.h | 9 +++++++++
2 files changed, 19 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index fd2adac..c98c2ba 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1838,6 +1838,16 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
Instance ID (1 octet)

Opcode 0x87 - Get Characteristic notification
+
+ Notification parameters: Connection ID (4 octets)
+ Status (4 octets)
+ GATT Service ID (18 octets)
+ GATT Char. ID (17 octets)
+ Char Prop. (4 octets)
+ Valid GATT Service: As described in Search Result
+ Valid GATT Char. ID: UUID (16 octets)
+ Instance ID (1 octet)
+
Opcode 0x88 - Get Descriptor notification
Opcode 0x89 - Get Included Service notification
Opcode 0x8a - Register For Notification notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index daea6ed..148bd44 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1279,3 +1279,12 @@ struct hal_ev_gatt_client_search_result {
int32_t conn_id;
struct hal_gatt_srvc_id srvc_id;
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_GET_CHARACTERISTIC 0x87
+struct hal_ev_gatt_client_get_characteristic {
+ int32_t conn_id;
+ int32_t status;
+ struct hal_gatt_srvc_id srvc_id;
+ struct hal_gatt_gatt_id char_id;
+ int32_t char_prop;
+} __attribute__((packed));
--
1.9.0


2014-02-28 10:23:47

by Jakub Tyszkowski

[permalink] [raw]
Subject: [PATCH 02/18] android/hal-gatt-api: Add Client Scan Result event

---
android/hal-ipc-api.txt | 6 ++++++
android/hal-msg.h | 8 ++++++++
2 files changed, 14 insertions(+)

diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 58c05a9..ab9cbc5 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -1803,6 +1803,12 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
UUID (16 octets)

Opcode 0x82 - Scan Result notification
+
+ Notification parameters: Address (6 octets)
+ RSSI (4 octets)
+ Length (2 octets)
+ Data (variable)
+
Opcode 0x83 - Connect Device notification
Opcode 0x84 - Disconnect Device notification
Opcode 0x85 - Search Complete notification
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 9f7f9e9..1dad9e1 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1243,3 +1243,11 @@ struct hal_ev_gatt_client_register_client {
int32_t client_if;
uint8_t app_uuid[16];
} __attribute__((packed));
+
+#define HAL_EV_GATT_CLIENT_SCAN_RESULT 0x82
+struct hal_ev_gatt_client_scan_result {
+ uint8_t bda[6];
+ int32_t rssi;
+ uint16_t len;
+ uint8_t adv_data[0];
+} __attribute__((packed));
--
1.9.0


2014-03-02 22:02:25

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCH 01/18] android/hal-gatt-api: Add Client Register event

Hi Jakub,

On Friday 28 of February 2014 11:23:46 Jakub Tyszkowski wrote:
> ---
> android/hal-ipc-api.txt | 5 +++++
> android/hal-msg.h | 7 +++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
> index 1a19c80..58c05a9 100644
> --- a/android/hal-ipc-api.txt
> +++ b/android/hal-ipc-api.txt
> @@ -1797,6 +1797,11 @@ Android HAL name: "gatt" (BT_PROFILE_GATT_ID)
> In case of an error, the error response will be returned.
>
> Opcode 0x81 - Register Client notification
> +
> + Notification parameters: Status (4 octets)
> + Client Interface (4 octets)
> + UUID (16 octets)
> +
> Opcode 0x82 - Scan Result notification
> Opcode 0x83 - Connect Device notification
> Opcode 0x84 - Disconnect Device notification
> diff --git a/android/hal-msg.h b/android/hal-msg.h
> index bde9717..9f7f9e9 100644
> --- a/android/hal-msg.h
> +++ b/android/hal-msg.h
> @@ -1236,3 +1236,10 @@ struct hal_ev_avrcp_passthrough_cmd {
> uint8_t id;
> uint8_t state;
> } __attribute__((packed));
> +
> +#define HAL_EV_GATT_CLIENT_REGISTER_CLIENT 0x81
> +struct hal_ev_gatt_client_register_client {
> + int32_t status;
> + int32_t client_if;
> + uint8_t app_uuid[16];
> +} __attribute__((packed));

All patches in this set are now applied, thanks.

--
BR
Szymon Janc