Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCHv3 2/6] shared/hfp: Add implementiation of processing commands
From: Marcin Kraglak @ 2014-02-28  9:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1393579358-11514-1-git-send-email-marcin.kraglak@tieto.com>

It will look for prefix handler for given cammand.
---
 src/shared/hfp.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 94 insertions(+), 4 deletions(-)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index 12d0754..e4cb011 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -29,6 +29,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <stdarg.h>
+#include <ctype.h>
 
 #include "src/shared/util.h"
 #include "src/shared/ringbuf.h"
@@ -69,6 +70,11 @@ struct prefix_handler_data {
 	hfp_result_func_t callback;
 };
 
+struct hfp_gw_result {
+	const char *data;
+	int offset;
+};
+
 static void destroy_prefix_handler_data(void *data)
 {
 	struct prefix_handler_data *handler = data;
@@ -130,6 +136,88 @@ static void wakeup_writer(struct hfp_gw *hfp)
 	hfp->writer_active = true;
 }
 
+static void skip_whitespace(struct hfp_gw_result *result)
+{
+	while (result->data[result->offset] == ' ')
+		result->offset++;
+}
+
+static bool call_prefix_handler(struct hfp_gw *hfp, const char *data)
+{
+	struct prefix_handler_data *handler;
+	const char *separators = ";?=\0";
+	struct hfp_gw_result result;
+	enum hfp_cmd_type type;
+	char lookup_prefix[18];
+	uint8_t pref_len = 0;
+	const char *prefix;
+	int i;
+
+	result.offset = 0;
+	result.data = data;
+
+	skip_whitespace(&result);
+
+	if (strlen(data + result.offset) < 3)
+		return false;
+
+	if (strncmp(data + result.offset, "AT", 2))
+		if (strncmp(data + result.offset, "at", 2))
+			return false;
+
+	result.offset += 2;
+	prefix = data + result.offset;
+
+	if (isalpha(prefix[0])) {
+		lookup_prefix[pref_len++] = toupper(prefix[0]);
+	} else {
+		pref_len = strcspn(prefix, separators);
+		if (pref_len > 17 || pref_len < 2)
+			return false;
+
+		for (i = 0; i < pref_len; i++)
+			lookup_prefix[i] = toupper(prefix[i]);
+	}
+
+	lookup_prefix[pref_len] = '\0';
+	result.offset += pref_len;
+
+	if (lookup_prefix[0] == 'D') {
+		type = HFP_AT_SET;
+		goto done;
+	}
+
+	if (data[result.offset] == '=') {
+		result.offset++;
+		if (data[result.offset] == '?') {
+			result.offset++;
+			type = HFP_AT_TEST;
+		} else {
+			type = HFP_AT_SET;
+		}
+		goto done;
+	}
+
+	if (data[result.offset] == '?') {
+		result.offset++;
+		type = HFP_AT_READ;
+		goto done;
+	}
+
+	type = HFP_AT_COMMAND;
+
+done:
+
+	handler = queue_find(hfp->prefix_handlers, match_handler_prefix,
+								lookup_prefix);
+	if (!handler)
+		return false;
+
+	handler->callback(&result, type, handler->user_data);
+
+	return true;
+}
+
 static void process_input(struct hfp_gw *hfp)
 {
 	char *str, *ptr;
@@ -162,10 +250,12 @@ static void process_input(struct hfp_gw *hfp)
 
 	hfp->result_pending = true;
 
-	if (hfp->command_callback)
-		hfp->command_callback(str, hfp->command_data);
-	else
-		hfp_gw_send_result(hfp, HFP_RESULT_ERROR);
+	if (!call_prefix_handler(hfp, str)) {
+		if (hfp->command_callback)
+			hfp->command_callback(str, hfp->command_data);
+		else
+			hfp_gw_send_result(hfp, HFP_RESULT_ERROR);
+	}
 
 	len = ringbuf_drain(hfp->read_buf, count + 1);
 
-- 
1.8.5.3


^ permalink raw reply related

* [PATCHv3 3/6] shared/hfp: Add get_number implementation
From: Marcin Kraglak @ 2014-02-28  9:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1393579358-11514-1-git-send-email-marcin.kraglak@tieto.com>

User can call this function with hfp_gw_result, which will
be passed to prefix handler.
---
 src/shared/hfp.c | 33 +++++++++++++++++++++++++++++++++
 src/shared/hfp.h |  2 ++
 2 files changed, 35 insertions(+)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index e4cb011..b5a0e44 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -218,6 +218,39 @@ done:
 	return true;
 }
 
+static void next_field(struct hfp_gw_result *result)
+{
+	if (result->data[result->offset] == ',')
+		result->offset++;
+}
+
+bool hfp_gw_result_get_number(struct hfp_gw_result *result, int *val)
+{
+	int temp = 0;
+	int i;
+
+	skip_whitespace(result);
+
+	i = result->offset;
+
+	while (result->data[i] >= '0' && result->data[i] <= '9') {
+		temp *= 10;
+		temp += result->data[i++] - '0';
+	}
+
+	if (i == result->offset)
+		return false;
+
+	if (val)
+		*val = temp;
+	result->offset = i;
+
+	skip_whitespace(result);
+	next_field(result);
+
+	return true;
+}
+
 static void process_input(struct hfp_gw *hfp)
 {
 	char *str, *ptr;
diff --git a/src/shared/hfp.h b/src/shared/hfp.h
index 4dc293f..2e1a8a2 100644
--- a/src/shared/hfp.h
+++ b/src/shared/hfp.h
@@ -112,3 +112,5 @@ bool hfp_gw_register_prefix_handler(struct hfp_gw *hfp,
 						char *prefix, void *user_data,
 						hfp_destroy_func_t destroy);
 bool hfp_gw_unregister_prefix_handler(struct hfp_gw *hfp, char *prefix);
+
+bool hfp_gw_result_get_number(struct hfp_gw_result *result, int *val);
-- 
1.8.5.3


^ permalink raw reply related

* [PATCHv3 4/6] shared/hfp: Add open/close container function
From: Marcin Kraglak @ 2014-02-28  9:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1393579358-11514-1-git-send-email-marcin.kraglak@tieto.com>

It will look for "(" or ")" parenthesis and skip it if found.
---
 src/shared/hfp.c | 26 ++++++++++++++++++++++++++
 src/shared/hfp.h |  2 ++
 2 files changed, 28 insertions(+)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index b5a0e44..7f576d9 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -251,6 +251,32 @@ bool hfp_gw_result_get_number(struct hfp_gw_result *result, int *val)
 	return true;
 }
 
+bool hfp_gw_result_open_container(struct hfp_gw_result *result)
+{
+	skip_whitespace(result);
+
+	/* The list shall be preceded by a left parenthesis "(") */
+	if (result->data[result->offset] != '(')
+		return false;
+
+	result->offset++;
+
+	return true;
+}
+
+bool hfp_gw_result_close_container(struct hfp_gw_result *result)
+{
+	skip_whitespace(result);
+
+	/* The list shall be followed by a right parenthesis (")" V250 5.7.3.1*/
+	if (result->data[result->offset] != ')')
+		return false;
+
+	result->offset++;
+
+	return true;
+}
+
 static void process_input(struct hfp_gw *hfp)
 {
 	char *str, *ptr;
diff --git a/src/shared/hfp.h b/src/shared/hfp.h
index 2e1a8a2..46067b7 100644
--- a/src/shared/hfp.h
+++ b/src/shared/hfp.h
@@ -114,3 +114,5 @@ bool hfp_gw_register_prefix_handler(struct hfp_gw *hfp,
 bool hfp_gw_unregister_prefix_handler(struct hfp_gw *hfp, char *prefix);
 
 bool hfp_gw_result_get_number(struct hfp_gw_result *result, int *val);
+bool hfp_gw_result_open_container(struct hfp_gw_result *result);
+bool hfp_gw_result_close_container(struct hfp_gw_result *result);
-- 
1.8.5.3


^ permalink raw reply related

* [PATCHv3 5/6] shared/hfp: Add function to get string
From: Marcin Kraglak @ 2014-02-28  9:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1393579358-11514-1-git-send-email-marcin.kraglak@tieto.com>

It will look for quoted sting and write it to given buffer.
---
 src/shared/hfp.c | 33 +++++++++++++++++++++++++++++++++
 src/shared/hfp.h |  2 ++
 2 files changed, 35 insertions(+)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index 7f576d9..08b72a3 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -277,6 +277,39 @@ bool hfp_gw_result_close_container(struct hfp_gw_result *result)
 	return true;
 }
 
+bool hfp_gw_result_get_string(struct hfp_gw_result *result, char *buf,
+								uint8_t len)
+{
+	int i = 0;
+	const char *data = result->data;
+
+	skip_whitespace(result);
+
+	if (data[result->offset] != '"')
+		return false;
+
+	result->offset++;
+
+	while (data[result->offset] != '\0' && data[result->offset] != '"') {
+		if (i < len)
+			buf[i++] = data[result->offset];
+		result->offset++;
+	}
+
+	if (i < len)
+		buf[i++] = '\0';
+
+	if (data[result->offset] == '"')
+		result->offset++;
+	else
+		return false;
+
+	skip_whitespace(result);
+	next_field(result);
+
+	return true;
+}
+
 static void process_input(struct hfp_gw *hfp)
 {
 	char *str, *ptr;
diff --git a/src/shared/hfp.h b/src/shared/hfp.h
index 46067b7..84b5016 100644
--- a/src/shared/hfp.h
+++ b/src/shared/hfp.h
@@ -116,3 +116,5 @@ bool hfp_gw_unregister_prefix_handler(struct hfp_gw *hfp, char *prefix);
 bool hfp_gw_result_get_number(struct hfp_gw_result *result, int *val);
 bool hfp_gw_result_open_container(struct hfp_gw_result *result);
 bool hfp_gw_result_close_container(struct hfp_gw_result *result);
+bool hfp_gw_result_get_string(struct hfp_gw_result *result, char *buf,
+								uint8_t len);
-- 
1.8.5.3


^ permalink raw reply related

* [PATCHv3 6/6] shared/hfp: Add function to get unquoted string
From: Marcin Kraglak @ 2014-02-28  9:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1393579358-11514-1-git-send-email-marcin.kraglak@tieto.com>

---
 src/shared/hfp.c | 28 ++++++++++++++++++++++++++++
 src/shared/hfp.h |  2 ++
 2 files changed, 30 insertions(+)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index 08b72a3..69ee6d8 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -310,6 +310,34 @@ bool hfp_gw_result_get_string(struct hfp_gw_result *result, char *buf,
 	return true;
 }
 
+bool hfp_gw_result_get_unquoted_string(struct hfp_gw_result *result, char *buf,
+								uint8_t len)
+{
+	const char *data = result->data;
+	int i = 0;
+	char c;
+
+	skip_whitespace(result);
+
+	c = data[result->offset];
+	if (c == '"' || c == ')' || c == '(')
+		return false;
+
+	while (data[result->offset] != '\0' && data[result->offset] != ','
+					&& data[result->offset] != ')') {
+		if (i < len)
+			buf[i++] = data[result->offset];
+		result->offset++;
+	}
+
+	if (i < len)
+		buf[i++] = '\0';
+
+	next_field(result);
+
+	return true;
+}
+
 static void process_input(struct hfp_gw *hfp)
 {
 	char *str, *ptr;
diff --git a/src/shared/hfp.h b/src/shared/hfp.h
index 84b5016..32c872d 100644
--- a/src/shared/hfp.h
+++ b/src/shared/hfp.h
@@ -118,3 +118,5 @@ bool hfp_gw_result_open_container(struct hfp_gw_result *result);
 bool hfp_gw_result_close_container(struct hfp_gw_result *result);
 bool hfp_gw_result_get_string(struct hfp_gw_result *result, char *buf,
 								uint8_t len);
+bool hfp_gw_result_get_unquoted_string(struct hfp_gw_result *result, char *buf,
+								uint8_t len);
-- 
1.8.5.3


^ permalink raw reply related

* [PATCH 1/2] unit/avrcp: Add /TP/PAS/BV-06-C test
From: Andrei Emeltchenko @ 2014-02-28  9:42 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Test verifies that the list player application setting values response
issued from the Target.
---
 unit/test-avrcp.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index db9cb92..51fe064 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -355,6 +355,26 @@ static uint8_t avrcp_handle_get_player_attr_text(struct avrcp *session,
 	return AVC_CTYPE_STABLE;
 }
 
+static uint8_t avrcp_handle_list_player_values(struct avrcp *session,
+				uint8_t transaction, uint16_t *params_len,
+				uint8_t *params, void *user_data)
+{
+	DBG("params[0] %d params_len %d", params[0], *params_len);
+
+	if (*params_len != 1)
+		goto fail;
+
+	*params_len = 1;
+	params[0] = 0;
+	return AVC_CTYPE_STABLE;
+
+fail:
+	*params_len = 1;
+	params[0] = AVRCP_STATUS_INVALID_PARAM;
+
+	return AVC_CTYPE_REJECTED;
+}
+
 static const struct avrcp_control_handler control_handlers[] = {
 		{ AVRCP_GET_CAPABILITIES, AVC_CTYPE_STATUS,
 					avrcp_handle_get_capabilities },
@@ -362,6 +382,8 @@ static const struct avrcp_control_handler control_handlers[] = {
 					avrcp_handle_list_attributes },
 		{ AVRCP_GET_PLAYER_ATTRIBUTE_TEXT, AVC_CTYPE_STATUS,
 					avrcp_handle_get_player_attr_text },
+		{ AVRCP_LIST_PLAYER_VALUES, AVC_CTYPE_STATUS,
+					avrcp_handle_list_player_values },
 		{ },
 };
 
@@ -518,5 +540,15 @@ int main(int argc, char *argv[])
 				AVRCP_GET_PLAYER_ATTRIBUTE_TEXT,
 				0x00, 0x00, 0x01, 0x00));
 
+	define_test("/TP/PAS/BV-06-C", test_server,
+			raw_pdu(0x00, 0x11, 0x0e, 0x01, 0x48, 0x00,
+				0x00, 0x19, 0x58,
+				AVRCP_LIST_PLAYER_VALUES,
+				0x00, 0x00, 0x01, 0x00),
+			raw_pdu(0x02, 0x11, 0x0e, 0x0c, 0x48, 0x00,
+				0x00, 0x19, 0x58,
+				AVRCP_LIST_PLAYER_VALUES,
+				0x00, 0x00, 0x01, 0x00));
+
 	return g_test_run();
 }
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 2/2] doc: Update test coverage document
From: Andrei Emeltchenko @ 2014-02-28  9:42 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1393580549-9531-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Update AVRCP test numbers.
---
 doc/test-coverage.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index d37bcb8..805af68 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
@@ -18,7 +18,7 @@ test-ringbuf		   3	Ring buffer functionality
 test-queue		   1	Queue handling functionality
 test-avdtp		  60	AVDTP qualification test cases
 test-avctp		   9	AVCTP qualification test cases
-test-avrcp		   7	AVRCP qualification test cases
+test-avrcp		  19	AVRCP qualification test cases
 test-gobex		  31	Generic OBEX functionality
 test-gobex-packet	   9	OBEX packet handling
 test-gobex-header	  28	OBEX header handling
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 01/18] android/hal-gatt-api: Add Client Register event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

---
 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


^ permalink raw reply related

* [PATCH 02/18] android/hal-gatt-api: Add Client Scan Result event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 03/18] android/hal-gatt-api: Add Client Connect event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 04/18] android/hal-gatt-api: Add Client Disconnect event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 05/18] android/hal-gatt-api: Add Client Search Complete event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 06/18] android/hal-gatt-api: Add Client Search Result event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 07/18] android/hal-gatt-api: Add Client Get Characteristic event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 08/18] android/hal-gatt-api: Add Client Get Descriptor event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 09/18] android/hal-gatt-api: Add Client Get Included Service event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 10/18] android/hal-gatt-api: Add Client Register for Notification event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 11/18] android/hal-gatt-api: Add Client Notify event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 12/18] android/hal-gatt-api: Add Client Read Characteristic event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 13/18] android/hal-gatt-api: Add Client Write Characteristic event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 14/18] android/hal-gatt-api: Add Client Read Descriptor event
From: Jakub Tyszkowski @ 2014-02-28 10:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 15/18] android/hal-gatt-api: Add Client Write Descriptor event
From: Jakub Tyszkowski @ 2014-02-28 10:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 16/18] android/hal-gatt-api: Add Client Exec Write event
From: Jakub Tyszkowski @ 2014-02-28 10:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 17/18] android/hal-gatt-api: Add Client Read Remote RSSI event
From: Jakub Tyszkowski @ 2014-02-28 10:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related

* [PATCH 18/18] android/hal-gatt-api: Add Client Listen event
From: Jakub Tyszkowski @ 2014-02-28 10:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski
In-Reply-To: <1393583043-23455-1-git-send-email-jakub.tyszkowski@tieto.com>

---
 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


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox