Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] audio/AVRCP: Fix sending invalid response to GetCapabilities
From: Luiz Augusto von Dentz @ 2014-01-28 20:05 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The attribute count has to be initialized with 0 since we reuse the same
buffer for both command and responses it may be already be set causing
invalid response to be generated.
---
 profiles/audio/avrcp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 59a966e..ad5dc34 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -921,6 +921,7 @@ static uint8_t avrcp_handle_get_capabilities(struct avrcp *session,
 
 		return AVC_CTYPE_STABLE;
 	case CAP_EVENTS_SUPPORTED:
+		pdu->params[1] = 0;
 		for (i = 1; i <= AVRCP_EVENT_LAST; i++) {
 			if (session->supported_events & (1 << i)) {
 				pdu->params[1]++;
-- 
1.8.4.2


^ permalink raw reply related

* [PATCH] android/pts: PTS test results for OPP
From: Sebastian Chlad @ 2014-01-28 17:59 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian Chlad

---
 android/pts-opp.txt | 37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/android/pts-opp.txt b/android/pts-opp.txt
index b9329b9..3c4ab47 100644
--- a/android/pts-opp.txt
+++ b/android/pts-opp.txt
@@ -1,7 +1,7 @@
 PTS test results for OPP
 
-PTS version: 4.9
-Tested: 14.11.2013
+PTS version: 5.0
+Tested: 28.01.2014
 
 Results:
 PASS	test passed
@@ -14,9 +14,9 @@ Test Name		Result	Notes
 -------------------------------------------------------------------------------
 TC_CLIENT_OPH_BV_01_I	PASS
 TC_CLIENT_OPH_BV_02_I	N/A
-TC_CLIENT_OPH_BV_03_I	PASS
+TC_CLIENT_OPH_BV_03_I	PASS	Tester must send a contact to PTS
 TC_CLIENT_OPH_BV_04_I	N/A
-TC_CLIENT_OPH_BV_05_I	PASS
+TC_CLIENT_OPH_BV_05_I	PASS	Tester must send a contact to PTS
 TC_CLIENT_OPH_BV_07_I	N/A
 TC_CLIENT_OPH_BV_08_I	N/A
 TC_CLIENT_OPH_BV_09_I	N/A
@@ -49,33 +49,36 @@ TC_CLIENT_BCE_BV_04_I	N/A
 TC_CLIENT_BCE_BV_05_I	N/A
 TC_CLIENT_BCE_BV_06_I	N/A
 TC_CLIENT_BCE_BV_07_I	N/A
-TC_SERVER_OPH_BV_01_I	PASS
-TC_SERVER_OPH_BV_02_I	PASS
-TC_SERVER_OPH_BV_03_I	PASS
-TC_SERVER_OPH_BV_04_I	PASS
-TC_SERVER_OPH_BV_05_I	PASS
+TC_SERVER_OPH_BV_01_I	PASS	IUT must be in the connectable mode
+TC_SERVER_OPH_BV_02_I	PASS	IUT must be in the connectable mode
+TC_SERVER_OPH_BV_03_I	PASS	IUT must be in the connectable mode. Tester must
+					accept incoming file
+TC_SERVER_OPH_BV_04_I	PASS	IUT must be in the connectable mode. Tester must
+					accept incoming file
+TC_SERVER_OPH_BV_05_I	PASS	IUT must be in the connectable mode. Tester must
+					reject incoming file
 TC_SERVER_OPH_BV_07_I	N/A
 TC_SERVER_OPH_BV_08_I	N/A
 TC_SERVER_OPH_BV_09_I	N/A
-TC_SERVER_OPH_BV_10_I	PASS
+TC_SERVER_OPH_BV_10_I	PASS	IUT must be in the connectable mode
 TC_SERVER_OPH_BV_11_I	N/A
 TC_SERVER_OPH_BV_12_I	N/A
 TC_SERVER_OPH_BV_13_I	N/A
-TC_SERVER_OPH_BV_14_I	PASS
+TC_SERVER_OPH_BV_14_I	PASS	IUT must be in the connectable mode
 TC_SERVER_OPH_BV_15_I	N/A
 TC_SERVER_OPH_BV_16_I	N/A
 TC_SERVER_OPH_BV_17_I	N/A
-TC_SERVER_OPH_BV_18_I	PASS
-TC_SERVER_OPH_BV_19_I	PASS
+TC_SERVER_OPH_BV_18_I	PASS	IUT must be in the connectable mode
+TC_SERVER_OPH_BV_19_I	PASS	IUT must be in the connectable mode
 TC_SERVER_OPH_BV_21_I	N/A
-TC_SERVER_OPH_BV_22_I	PASS
-TC_SERVER_OPH_BV_23_I	PASS
+TC_SERVER_OPH_BV_22_I	PASS	IUT must be in the connectable mode
+TC_SERVER_OPH_BV_23_I	PASS	IUT must be in the connectable mode
 TC_SERVER_OPH_BV_24_I	N/A
 TC_SERVER_OPH_BV_25_I	N/A
 TC_SERVER_OPH_BV_26_I	N/A
-TC_SERVER_OPH_BV_34_I	PASS
+TC_SERVER_OPH_BV_34_I	PASS	IUT must be in the connectable mode
 TC_SERVER_BCP_BV_01_I	N/A
-TC_SERVER_BCP_BV_02_I	PASS
+TC_SERVER_BCP_BV_02_I	PASS	IUT must be in the connectable mode
 TC_SERVER_BCP_BV_03_I	N/A
 TC_SERVER_BCP_BV_04_I	N/A
 TC_SERVER_BCP_BV_05_I	N/A
-- 
1.8.3.2

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply related

* [PATCH] android/pts: PTS test results for PBAP
From: Sebastian Chlad @ 2014-01-28 17:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian Chlad

---
 android/pts-pbap.txt | 103 +++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 88 insertions(+), 15 deletions(-)

diff --git a/android/pts-pbap.txt b/android/pts-pbap.txt
index 843b7cf..4312921 100644
--- a/android/pts-pbap.txt
+++ b/android/pts-pbap.txt
@@ -1,7 +1,7 @@
 PTS test results for PBAP
 
 PTS version: 5.0
-Tested: 14.11.2013
+Tested: 28.01.2014
 
 Results:
 PASS	test passed
@@ -17,32 +17,82 @@ TC_PCE_SSM_BV_02_C	N/A
 TC_PCE_SSM_BV_06_C	N/A
 TC_PCE_SSM_BV_08_C	N/A
 TC_PCE_SSM_BI_01_C	N/A
+TC_PCE_SSM_BV_09_C	N/A
+TC_PCE_SSM_BV_10_C	N/A
 TC_PCE_PBD_BV_01_C	N/A
 TC_PCE_PBD_BV_04_C	N/A
+TC_PCE_PBD_BV_38_C	N/A
+TC_PCE_PBD_BV_29_C	N/A
+TC_PCE_PBD_BV_40_C	N/A
+TC_PCE_PBD_BV_41_C	N/A
+TC_PCE_PBD_BV_42_C	N/A
+TC_PCE_PBD_BV_43_C	N/A
+TC_PCE_PBD_BV_44_C	N/A
+TC_PCE_PBD_BV_45_C	N/A
+TC_PCE_PBD_BV_46_C	N/A
+TC_PCE_PBD_BV_47_C	N/A
+TC_PCE_PBD_BV_48_C	N/A
 TC_PCE_PBB_BV_01_C	N/A
 TC_PCE_PBB_BV_02_C	N/A
 TC_PCE_PBB_BV_03_C	N/A
 TC_PCE_PBB_BV_05_C	N/A
+TC_PCE_PBB_BV_39_C	N/A
+TC_PCE_PBB_BV_40_C	N/A
+TC_PCE_PBB_BV_41_C	N/A
+TC_PCE_PBB_BV_42_C	N/A
+TC_PCE_PBB_BV_33_C	N/A
+TC_PCE_PBB_BV_34_C	N/A
+TC_PCE_PBB_BV_35_C	N/A
+TC_PCE_PBB_BV_36_C	N/A
+TC_PCE_PBB_BV_43_C	N/A
+TC_PCE_PBB_BV_37_C	N/A
+TC_PCE_PBB_BV_38_C	N/A
 TC_PCE_PBF_BV_01_I	N/A
 TC_PCE_PBF_BV_02_I	N/A
+TC_PCE_PBF_BV_03_I	N/A
 TC_PCE_PDF_BV_01_I	N/A
-TC_PCE_PDF_BV_04_I	N/A
+TC_PCE_PDF_BV_06_I	N/A
 TC_PSE_SSM_BV_03_C	PASS
 TC_PSE_SSM_BV_05_C	PASS
-TC_PSE_SSM_BV_07_C	PASS
+TC_PSE_SSM_BV_07_C	PASS	Tester must accept obex request with
+					TSPX_auth_password set in PIXITs
 TC_PSE_SSM_BI_02_C	PASS
 TC_PSE_SSM_BI_03_C	N/A
-TC_PSE_SSM_BV_08_I	PASS
-TC_PSE_PBD_BV_02_C	PASS
-TC_PSE_PBD_BV_03_C	PASS
+TC_PSE_SSM_BV_08_I	PASS	Tester must compare passkey on IUT and PTS
+TC_PSE_SSM_BV_11_C	N/A
+
+TC_PSE_PBD_BV_02_C	PASS	Tester must compare phone book size with the value
+					given by PTS
+TC_PSE_PBD_BV_03_C	PASS	Tester must compare phone book size with the value
+					given by PTS
 TC_PSE_PBD_BV_05_C	N/A
 TC_PSE_PBD_BI_01_C	FAIL
-TC_PSE_PBD_BV_11_C	N/A
-TC_PSE_PBD_BV_12_C	N/A
-TC_PSE_PBD_BV_13_C	N/A
-TC_PSE_PBD_BV_14_C	N/A
-TC_PSE_PBD_BV_15_C	N/A
-TC_PSE_PBD_BV_16_C	N/A
+TC_PSE_PBD_BV_06_C	N/A
+TC_PSE_PBD_BV_07_C	N/A
+TC_PSE_PBD_BV_08_C	N/A
+TC_PSE_PBD_BV_09_C	N/A
+TC_PSE_PBD_BV_10_C	N/A
+TC_PSE_PBD_BV_17_C	FAIL
+TC_PSE_PBD_BV_18_C	N/A
+TC_PSE_PBD_BV_19_C	N/A
+TC_PSE_PBD_BV_20_C	N/A
+TC_PSE_PBD_BV_21_C	N/A
+TC_PSE_PBD_BV_22_C	N/A
+TC_PSE_PBD_BV_23_C	N/A
+TC_PSE_PBD_BV_24_C	N/A
+TC_PSE_PBD_BV_25_C	N/A
+TC_PSE_PBD_BV_26_C	N/A
+TC_PSE_PBD_BV_27_C	N/A
+TC_PSE_PBD_BV_28_C	N/A
+TC_PSE_PBD_BV_29_C	N/A
+TC_PSE_PBD_BV_30_C	N/A
+TC_PSE_PBD_BV_31_C	N/A
+TC_PSE_PBD_BV_32_C	N/A
+TC_PSE_PBD_BV_33_C	N/A
+TC_PSE_PBD_BV_34_C	N/A
+TC_PSE_PBD_BV_35_C	N/A
+TC_PSE_PBD_BV_36_C	PASS
+TC_PSE_PBD_BV_37_C	N/A
 TC_PSE_PBB_BV_06_C	PASS
 TC_PSE_PBB_BV_07_C	PASS
 TC_PSE_PBB_BV_08_C	PASS
@@ -51,9 +101,32 @@ TC_PSE_PBB_BV_10_C	PASS
 TC_PSE_PBB_BV_11_C	PASS
 TC_PSE_PBB_BI_01_C	PASS
 TC_PSE_PBB_BI_07_C	PASS
+TC_PSE_PBB_BV_12_C	PASS
+TC_PSE_PBB_BV_13_C	N/A
+TC_PSE_PBB_BV_14_C	N/A
+TC_PSE_PBB_BV_15_C	N/A
+TC_PSE_PBB_BV_16_C	N/A
+TC_PSE_PBB_BV_17_C	N/A
+TC_PSE_PBB_BV_18_C	N/A
+TC_PSE_PBB_BV_19_C	N/A
+TC_PSE_PBB_BV_20_C	N/A
+TC_PSE_PBB_BV_21_C	N/A
+TC_PSE_PBB_BV_22_C	N/A
+TC_PSE_PBB_BV_23_C	N/A
+TC_PSE_PBB_BV_24_C	N/A
+TC_PSE_PBB_BV_25_C	N/A
+TC_PSE_PBB_BV_26_C	N/A
+TC_PSE_PBB_BV_27_C	N/A
+TC_PSE_PBB_BV_44_C	N/A
+TC_PSE_PBB_BV_45_C	N/A
+TC_PSE_PBB_BV_46_C	N/A
+TC_PSE_PBB_BV_28_C	N/A
+TC_PSE_PBB_BV_29_C	N/A
+TC_PSE_PBB_BV_30_C	N/A
+TC_PSE_PBB_BV_31_C	PASS
+TC_PSE_PBB_BV_32_C	N/A
 TC_PSE_PBF_BV_01_I	PASS
 TC_PSE_PBF_BV_02_I	PASS
-TC_PSE_PDF_BV_01_I	PASS
-TC_PSE_PDF_BV_03_I	N/A
-TC_PSE_PDF_BV_05_I	N/A
+TC_PSE_PDF_BV_01_I	PASS	Tester must compare phone book size with the value
+					given by PTS
 -------------------------------------------------------------------------------
-- 
1.8.3.2

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply related

* [PATCH BlueZ v3 4/4] android/hal-audio: Set stream fd to blocking
From: Luiz Augusto von Dentz @ 2014-01-28 17:14 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390929286-30206-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes the stream to block on io operation so it does not return
EAGAIN on syscall such as write.
---
 android/hal-audio.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/android/hal-audio.c b/android/hal-audio.c
index 2ca6289..b1323b0 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
@@ -25,6 +25,7 @@
 #include <sys/un.h>
 #include <unistd.h>
 #include <arpa/inet.h>
+#include <fcntl.h>
 
 #include <hardware/audio.h>
 #include <hardware/hardware.h>
@@ -1108,6 +1109,24 @@ static int in_remove_audio_effect(const struct audio_stream *stream,
 	return -ENOSYS;
 }
 
+static int set_blocking(int fd)
+{
+	int flags;
+
+	flags = fcntl(fd, F_GETFL, 0);
+	if (flags < 0) {
+		error("fcntl(F_GETFL): %s (%d)", strerror(errno), errno);
+		return -errno;
+	}
+
+	if (fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) < 0) {
+		error("fcntl(F_SETFL): %s (%d)", strerror(errno), errno);
+		return -errno;
+	}
+
+	return 0;
+}
+
 static int audio_open_output_stream(struct audio_hw_device *dev,
 					audio_io_handle_t handle,
 					audio_devices_t devices,
@@ -1156,8 +1175,10 @@ static int audio_open_output_stream(struct audio_hw_device *dev,
 	if (!preset || fd < 0)
 		goto fail;
 
-	out->ep->fd = fd;
+	if (set_blocking(fd) < 0)
+		goto fail;
 
+	out->ep->fd = fd;
 	codec = out->ep->codec;
 
 	codec->init(preset, mtu, &out->ep->codec_data);
-- 
1.8.4.2


^ permalink raw reply related

* [PATCH BlueZ v3 3/4] android/hal-audio: Fix not handling EINTR errors
From: Luiz Augusto von Dentz @ 2014-01-28 17:14 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390929286-30206-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If the kernel interrupts us while writting just try again.
---
 android/hal-audio.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/android/hal-audio.c b/android/hal-audio.c
index 8d737ad..2ca6289 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
@@ -399,7 +399,7 @@ static void sbc_resume(void *codec_data)
 	sbc_data->frames_sent = 0;
 }
 
-static void write_media_packet(int fd, struct sbc_data *sbc_data,
+static int write_media_packet(int fd, struct sbc_data *sbc_data,
 				struct media_packet *mp, size_t data_len)
 {
 	struct timespec cur;
@@ -407,10 +407,13 @@ static void write_media_packet(int fd, struct sbc_data *sbc_data,
 	unsigned expected_frames;
 	int ret;
 
-	ret = write(fd, mp, sizeof(*mp) + data_len);
-	if (ret < 0) {
-		int err = errno;
-		error("SBC: failed to write data: %d (%s)", err, strerror(err));
+	while (true) {
+		ret = write(fd, mp, sizeof(*mp) + data_len);
+		if (ret >= 0)
+			break;
+
+		if (errno != EINTR)
+			return -errno;
 	}
 
 	sbc_data->frames_sent += mp->payload.frame_count;
@@ -432,6 +435,8 @@ static void write_media_packet(int fd, struct sbc_data *sbc_data,
 	if (sbc_data->frames_sent >= expected_frames)
 		usleep(sbc_data->frame_duration *
 				mp->payload.frame_count);
+
+	return ret;
 }
 
 static ssize_t sbc_write_data(void *codec_data, const void *buffer,
@@ -474,7 +479,9 @@ static ssize_t sbc_write_data(void *codec_data, const void *buffer,
 		 */
 		if (mp->payload.frame_count == sbc_data->frames_per_packet ||
 				bytes == consumed) {
-			write_media_packet(fd, sbc_data, mp, encoded);
+			ret = write_media_packet(fd, sbc_data, mp, encoded);
+			if (ret < 0)
+				return ret;
 
 			encoded = 0;
 			free_space = sbc_data->out_buf_size - sizeof(*mp);
-- 
1.8.4.2


^ permalink raw reply related

* [PATCH BlueZ v3 2/4] android/AVDTP: Make stream channel priority 5
From: Luiz Augusto von Dentz @ 2014-01-28 17:14 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390929286-30206-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes channel priority 5 so it has higher priority than regular
traffic but less than signalling channel.
---
 android/avdtp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/android/avdtp.c b/android/avdtp.c
index e93ff70..1783555 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -2832,10 +2832,19 @@ gboolean avdtp_stream_set_transport(struct avdtp_stream *stream, int fd,
 						size_t imtu, size_t omtu)
 {
 	GIOChannel *io;
+	int priority;
 
 	if (stream != stream->session->pending_open)
 		return FALSE;
 
+	priority = 5;
+	if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &priority,
+						sizeof(priority)) < 0) {
+		error("setsockopt(SO_PRIORITY): %s (%d)", strerror(errno),
+									errno);
+		return FALSE;
+	}
+
 	io = g_io_channel_unix_new(fd);
 
 	handle_transport_connect(stream->session, io, imtu, omtu);
-- 
1.8.4.2


^ permalink raw reply related

* [PATCH BlueZ v3 1/4] android/AVDTP: Make signalling channel priority 6
From: Luiz Augusto von Dentz @ 2014-01-28 17:14 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes signalling priority 6 so it can push commands before the
stream channel, without this the stream channel may be schedule
first and cause the signalling commands to timeout while waiting a slot.
---
v2: Return error if writes fails since that probably means the socket has been
disconnected, also makes code setting socket to blocking a bit cleaner.
v3: Remove cast as suggested by Marcel, make code setting stream fd to block a
separate function.

 android/avdtp.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/android/avdtp.c b/android/avdtp.c
index 4abcd75..e93ff70 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -2056,7 +2056,7 @@ struct avdtp *avdtp_new(int fd, size_t imtu, size_t omtu, uint16_t version)
 {
 	struct avdtp *session;
 	GIOCondition cond = G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL;
-	int new_fd;
+	int new_fd, priority;
 
 	new_fd = dup(fd);
 	if (new_fd < 0) {
@@ -2064,6 +2064,14 @@ struct avdtp *avdtp_new(int fd, size_t imtu, size_t omtu, uint16_t version)
 		return NULL;
 	}
 
+	priority = 6;
+	if (setsockopt(new_fd, SOL_SOCKET, SO_PRIORITY, &priority,
+						sizeof(priority)) < 0) {
+		error("setsockopt(SO_PRIORITY): %s (%d)", strerror(errno),
+									errno);
+		return NULL;
+	}
+
 	session = g_new0(struct avdtp, 1);
 	session->io = g_io_channel_unix_new(new_fd);
 	session->version = version;
-- 
1.8.4.2


^ permalink raw reply related

* Re: [PATCH] android/pts: PTS test results for DID
From: Szymon Janc @ 2014-01-28 15:58 UTC (permalink / raw)
  To: Sebastian Chlad; +Cc: linux-bluetooth
In-Reply-To: <1390916438-8190-1-git-send-email-sebastianx.chlad@intel.com>

Hi Sebastian,

On Tuesday 28 of January 2014 15:40:38 Sebastian Chlad wrote:
> ---
>  android/pts-did.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/pts-did.txt b/android/pts-did.txt
> index c44f56c..d764f09 100644
> --- a/android/pts-did.txt
> +++ b/android/pts-did.txt
> @@ -1,7 +1,7 @@
>  PTS test results for DID
> 
>  PTS version: 5.0
> -Tested: 11.12.2013
> +Tested: 28.01.2014
> 
>  Results:
>  PASS	test passed

Applied, thanks.

-- 
BR
Szymon Janc

^ permalink raw reply

* Re: [PATCH] android/pts: PTS test results for GAP
From: Szymon Janc @ 2014-01-28 15:57 UTC (permalink / raw)
  To: Sebastian Chlad; +Cc: linux-bluetooth
In-Reply-To: <1390913805-7207-1-git-send-email-sebastianx.chlad@intel.com>

Hi Sebastian,

On Tuesday 28 of January 2014 14:56:45 Sebastian Chlad wrote:
> ---
>  android/pts-gap.txt | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/android/pts-gap.txt b/android/pts-gap.txt
> index 0ea5539..1c0feec 100644
> --- a/android/pts-gap.txt
> +++ b/android/pts-gap.txt
> @@ -1,7 +1,7 @@
>  PTS test results for GAP
> 
> -PTS version: 4.9
> -Tested: 14.11.2013
> +PTS version: 5.0
> +Tested: 28.01.2014
> 
>  Results:
>  PASS	test passed
> @@ -12,14 +12,14 @@ N/A	test is disabled due to PICS setup
>  ---------------------------------------------------------------------------
> ---- Test Name		Result	Notes
>  ---------------------------------------------------------------------------
> ---- -TC_MOD_NDIS_BV_01_C	PASS
> +TC_MOD_NDIS_BV_01_C	PASS	IUT must be in non-discoverable mode
>  TC_MOD_LDIS_BV_01_C	N/A
>  TC_MOD_LDIS_BV_02_C	N/A
>  TC_MOD_LDIS_BV_03_C	N/A
> -TC_MOD_GDIS_BV_01_C	PASS
> -TC_MOD_GDIS_BV_02_C	PASS
> -TC_MOD_NCON_BV_01_C	PASS
> -TC_MOD_CON_BV_01_C	PASS
> +TC_MOD_GDIS_BV_01_C	PASS	IUT must be discoverable
> +TC_MOD_GDIS_BV_02_C	PASS	IUT must be discoverable
> +TC_MOD_NCON_BV_01_C	PASS	btmgmt connectable off
> +TC_MOD_CON_BV_01_C	PASS	btmgmt connectable on
>  TC_BROB_BCST_BV_01_C	N/A
>  TC_BROB_BCST_BV_02_C	N/A
>  TC_BROB_BCST_BV_03_C	N/A
> @@ -48,7 +48,7 @@ TC_DISC_GENP_BV_02_C	INC	LE not supported yet
>  TC_DISC_GENP_BV_03_C	INC	LE not supported yet
>  TC_DISC_GENP_BV_04_C	INC	LE not supported yet
>  TC_DISC_GENP_BV_05_C	INC	LE not supported yet
> -TC_IDLE_GIN_BV_01_C	PASS
> +TC_IDLE_GIN_BV_01_C	PASS	Start inquiry from IUT
>  TC_IDLE_LIN_BV_01_C	N/A
>  TC_IDLE_NAMP_BV_01_C	INC	LE not supported yet
>  TC_IDLE_NAMP_BV_02_C	INC	LE not supported yet
> @@ -144,7 +144,7 @@ TC_DM_NBON_BV_01_C	N/A
>  TC_DM_BON_BV_01_C	INC	LE not supported yet
>  TC_DM_GIN_BV_01_C	INC	LE not supported yet
>  TC_DM_LIN_BV_01_C	N/A
> -TC_DM_NAD_BV_01_C	PASS
> +TC_DM_NAD_BV_01_C	PASS	Start inquiry from IUT
>  TC_DM_NAD_BV_02_C	INC	LE not supported yet
>  TC_DM_LEP_BV_01_C	N/A
>  TC_DM_LEP_BV_02_C	N/A

Applied, thanks.

-- 
BR
Szymon Janc

^ permalink raw reply

* Re: [PATCH] android/pts: Add PTS test results for AVRCP
From: Szymon Janc @ 2014-01-28 15:57 UTC (permalink / raw)
  To: Sebastian Chlad; +Cc: linux-bluetooth
In-Reply-To: <1390911956-6714-1-git-send-email-sebastianx.chlad@intel.com>

Hi Sebastian,

On Tuesday 28 of January 2014 14:25:56 Sebastian Chlad wrote:
> ---
>  android/pts-avrcp.txt | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/android/pts-avrcp.txt b/android/pts-avrcp.txt
> index f2533b4..6ad97f7 100644
> --- a/android/pts-avrcp.txt
> +++ b/android/pts-avrcp.txt
> @@ -1,7 +1,7 @@
>  PTS test results for AVRCP
> 
>  PTS version: 5.0
> -Tested: --not yet tested--
> +Tested: 28.01.2014
> 
>  Results:
>  PASS	test passed
> @@ -91,17 +91,17 @@ Test Name		Result	Notes
>  ---------------------------------------------------------------------------
> ---- TC_TG_BGN_BV_01_I	N/A
>  TC_TG_BGN_BV_02_I	N/A
> -TC_TG_CEC_BV_01_I	INC
> -TC_TG_CEC_BV_02_I	INC
> +TC_TG_CEC_BV_01_I	PASS
> +TC_TG_CEC_BV_02_I	INC	Initiate a control chanenel connection
>  TC_TG_CFG_BI_01_C	INC
>  TC_TG_CFG_BV_02_C	INC
>  TC_TG_CON_BV_02_C	N/A
>  TC_TG_CON_BV_04_C	N/A
>  TC_TG_CON_BV_05_C	N/A
> -TC_TG_CRC_BV_01_I	INC
> -TC_TG_CRC_BV_02_I	INC
> -TC_TG_ICC_BV_01_I	INC
> -TC_TG_ICC_BV_02_I	INC
> +TC_TG_CRC_BV_01_I	PASS
> +TC_TG_CRC_BV_02_I	PASS	Disconnect from PTS
> +TC_TG_ICC_BV_01_I	PASS
> +TC_TG_ICC_BV_02_I	PASS
>  TC_TG_INV_BI_01_C	INC
>  TC_TG_INV_BI_02_C	N/A
>  TC_TG_MCN_CB_BI_01_C	N/A

Applied, thanks.

-- 
BR
Szymon Janc

^ permalink raw reply

* Re: [PATCH] android/pts: PTS test results for A2DP
From: Szymon Janc @ 2014-01-28 15:56 UTC (permalink / raw)
  To: Sebastian Chlad; +Cc: linux-bluetooth
In-Reply-To: <1390911083-6188-1-git-send-email-sebastianx.chlad@intel.com>

Hi Sebastian,

On Tuesday 28 of January 2014 14:11:23 Sebastian Chlad wrote:
> ---
>  android/pts-a2dp.txt | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/android/pts-a2dp.txt b/android/pts-a2dp.txt
> index c6eee62..67f9183 100644
> --- a/android/pts-a2dp.txt
> +++ b/android/pts-a2dp.txt
> @@ -1,7 +1,7 @@
>  PTS test results for A2DP
> 
>  PTS version: 5.0
> -Tested: 24.01.2014
> +Tested: 28.01.2014
> 
>  Results:
>  PASS	test passed
> @@ -15,18 +15,20 @@ Test Name		Result	Notes
>  ---------------------------------------------------------------------------
> ---- TC_SRC_CC_BV_09_I	INC
>  TC_SRC_CC_BV_10_I	N/A
> -TC_SRC_REL_BV_01_I	PASS
> +TC_SRC_REL_BV_01_I	PASS	Connect to PTS from IUT. When requested
> +					disconnect from IUT
>  TC_SRC_REL_BV_02_I	PASS
> -TC_SRC_SET_BV_01_I	PASS
> +TC_SRC_SET_BV_01_I	PASS	Connect to PTS (open a2dp)
>  TC_SRC_SET_BV_02_I	PASS
> -TC_SRC_SET_BV_03_I	PASS
> -TC_SRC_SET_BV_04_I	INC
> -TC_SRC_SET_BV_05_I	INC
> -TC_SRC_SET_BV_06_I	INC
> -TC_SRC_SUS_BV_01_I	INC
> +TC_SRC_SET_BV_03_I	PASS	Start streaming
> +TC_SRC_SET_BV_04_I	INC	Start streaming
> +TC_SRC_SET_BV_05_I	INC	IUT must be moved out of range
> +TC_SRC_SET_BV_06_I	INC	IUT must be moved out of range
> +TC_SRC_SUS_BV_01_I	PASS	Stop streaming
>  TC_SRC_SUS_BV_02_I	INC
>  TC_SRC_SDP_BV_01_I	PASS
> -TC_SRC_AS_BV_01_I	INC
> +TC_SRC_AS_BV_01_I	PASS	Requires checking if the output on the IUT is
> +					correct
>  ---------------------------------------------------------------------------
> ----

Applied, thanks.

-- 
BR
Szymon Janc

^ permalink raw reply

* [RFC BlueZ 3/3] alert: Only remove attio callback after ATT request was sent
From: Anderson Lizardo @ 2014-01-28 15:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo
In-Reply-To: <1390924298-13804-1-git-send-email-anderson.lizardo@openbossa.org>

If there is a single registered attio callback, any pending ATT requests
will be dropped as soon as it is removed. This commit makes sure that
the request is sent before removing the callback.

Other places using attio callbacks may need fixing as well.
---
 profiles/alert/server.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/profiles/alert/server.c b/profiles/alert/server.c
index 94e9865..92d4fb6 100644
--- a/profiles/alert/server.c
+++ b/profiles/alert/server.c
@@ -363,6 +363,20 @@ end:
 	return result;
 }
 
+static void destroy_notify_callback(guint8 status, const guint8 *pdu, guint16 len,
+							gpointer user_data)
+{
+	struct notify_callback *cb = user_data;
+
+	DBG("status=%#x", status);
+
+	btd_device_remove_attio_callback(cb->device, cb->id);
+	btd_device_unref(cb->device);
+	g_free(cb->notify_data->value);
+	g_free(cb->notify_data);
+	g_free(cb);
+}
+
 static void attio_connected_cb(GAttrib *attrib, gpointer user_data)
 {
 	struct notify_callback *cb = user_data;
@@ -398,7 +412,9 @@ static void attio_connected_cb(GAttrib *attrib, gpointer user_data)
 					al_adapter->hnd_value[type],
 					al_adapter->hnd_ccc[type]);
 
-	g_attrib_send(attrib, 0, pdu, len, NULL, NULL, NULL);
+	g_attrib_send(attrib, 0, pdu, len, destroy_notify_callback, cb, NULL);
+
+	return;
 
 end:
 	btd_device_remove_attio_callback(cb->device, cb->id);
-- 
1.8.3.2


^ permalink raw reply related

* [RFC BlueZ 2/3] core: Fix associating a GAttrib to a device on incoming connections
From: Anderson Lizardo @ 2014-01-28 15:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo
In-Reply-To: <1390924298-13804-1-git-send-email-anderson.lizardo@openbossa.org>

If BlueZ is running as slave, incoming connections using ATT CID will
have a GAttrib created for them. But this GAttrib will not be assigned
to the underlying device (whose struct btd_device instance was created
in response to the Device Connected mgmt event).

This patch fixes this by assigning the GAttrib to the btd_device as soon
as a connection is first requested, which is done using attio callbacks.

Note that a new GAttrib reference is taken because attio callbacks "own"
device->attrib and thus need their own reference.
---
 src/attrib-server.c | 22 ++++++++++++++++++++++
 src/attrib-server.h |  1 +
 src/device.c        |  5 +++++
 3 files changed, 28 insertions(+)

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 13b86e1..7a50022 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -1100,6 +1100,28 @@ done:
 	g_attrib_send(channel->attrib, 0, opdu, length, NULL, NULL, NULL);
 }
 
+GAttrib *attrib_from_device(struct btd_device *device)
+{
+	struct btd_adapter *adapter = device_get_adapter(device);
+	struct gatt_server *server;
+	GSList *l;
+
+	l = g_slist_find_custom(servers, adapter, adapter_cmp);
+	if (!l)
+		return NULL;
+
+	server = l->data;
+
+	for (l = server->clients; l; l = l->next) {
+		struct gatt_channel *channel = l->data;
+
+		if (channel->device == device)
+			return g_attrib_ref(channel->attrib);
+	}
+
+	return NULL;
+}
+
 guint attrib_channel_attach(GAttrib *attrib)
 {
 	struct gatt_server *server;
diff --git a/src/attrib-server.h b/src/attrib-server.h
index 90ba17c..063cb66 100644
--- a/src/attrib-server.h
+++ b/src/attrib-server.h
@@ -37,5 +37,6 @@ int attrib_gap_set(struct btd_adapter *adapter, uint16_t uuid,
 uint32_t attrib_create_sdp(struct btd_adapter *adapter, uint16_t handle,
 							const char *name);
 void attrib_free_sdp(struct btd_adapter *adapter, uint32_t sdp_handle);
+GAttrib *attrib_from_device(struct btd_device *device);
 guint attrib_channel_attach(GAttrib *attrib);
 gboolean attrib_channel_detach(GAttrib *attrib, guint id);
diff --git a/src/device.c b/src/device.c
index 41a6fc8..f771b63 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4470,6 +4470,11 @@ guint btd_device_add_attio_callback(struct btd_device *device,
 
 	device_set_auto_connect(device, TRUE);
 
+	/* Check if there is no GAttrib associated to the device created by a
+	 * incoming connection */
+	if (!device->attrib)
+		device->attrib = attrib_from_device(device);
+
 	if (device->attrib && cfunc) {
 		device->attios_offline = g_slist_append(device->attios_offline,
 									attio);
-- 
1.8.3.2


^ permalink raw reply related

* [RFC BlueZ 1/3] attrib-server: Remove unnecessary fields from struct gatt_channel
From: Anderson Lizardo @ 2014-01-28 15:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo
In-Reply-To: <1390924298-13804-1-git-send-email-anderson.lizardo@openbossa.org>

These fields are only used internally by attrib_channel_attach(). The
"No GATT server found..." error message was also removed as it is also
displayed by find_gatt_server().
---
 src/attrib-server.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 1c088df..13b86e1 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -71,8 +71,6 @@ struct gatt_server {
 };
 
 struct gatt_channel {
-	bdaddr_t src;
-	bdaddr_t dst;
 	GAttrib *attrib;
 	guint mtu;
 	gboolean le;
@@ -1107,6 +1105,7 @@ guint attrib_channel_attach(GAttrib *attrib)
 	struct gatt_server *server;
 	struct btd_device *device;
 	struct gatt_channel *channel;
+	bdaddr_t src, dst;
 	GIOChannel *io;
 	GError *gerr = NULL;
 	uint16_t cid;
@@ -1114,34 +1113,26 @@ guint attrib_channel_attach(GAttrib *attrib)
 
 	io = g_attrib_get_channel(attrib);
 
-	channel = g_new0(struct gatt_channel, 1);
-
 	bt_io_get(io, &gerr,
-			BT_IO_OPT_SOURCE_BDADDR, &channel->src,
-			BT_IO_OPT_DEST_BDADDR, &channel->dst,
+			BT_IO_OPT_SOURCE_BDADDR, &src,
+			BT_IO_OPT_DEST_BDADDR, &dst,
 			BT_IO_OPT_CID, &cid,
 			BT_IO_OPT_IMTU, &mtu,
 			BT_IO_OPT_INVALID);
 	if (gerr) {
 		error("bt_io_get: %s", gerr->message);
 		g_error_free(gerr);
-		g_free(channel);
 		return 0;
 	}
 
-	server = find_gatt_server(&channel->src);
-	if (server == NULL) {
-		char src[18];
-
-		ba2str(&channel->src, src);
-		error("No GATT server found in %s", src);
-		g_free(channel);
+	server = find_gatt_server(&src);
+	if (server == NULL)
 		return 0;
-	}
 
+	channel = g_new0(struct gatt_channel, 1);
 	channel->server = server;
 
-	device = btd_adapter_find_device(server->adapter, &channel->dst);
+	device = btd_adapter_find_device(server->adapter, &dst);
 	if (device == NULL) {
 		error("Device object not found for attrib server");
 		g_free(channel);
-- 
1.8.3.2


^ permalink raw reply related

* [RFC BlueZ 0/3] Fix GATT server issues with BlueZ as LE peripheral
From: Anderson Lizardo @ 2014-01-28 15:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

Hi,

Currently, we do not officially support running BlueZ as LE peripheral. But
there is already enough support from the kernel to support this. For instance,
there is the "Set Advertising" mgmt command to keep LE advertising enabled
after each connection.

The current tracking of connections in BlueZ does not fully work for peripheral
role. These patches are a first attempt to improve the situation. Other fixes
are necessary to have full LE Peripheral support.

In particular, with these patches, notifications for PASP and ANP profiles
(implemented in profiles/alert/*) should work when BlueZ is on the peripheral
role. Other GATT server profiles will need fixing as well.

I'm sending as RFC because I only did minimal testing. I hope that people
having issues with GATT server profiles running on peripheral role can tests
these patches. Otherwise, I'll do more tests later today and send a final
version by tomorrow.

Notes: 
* The first patch is just cleanup, so can be applied as is.
* For testing, make sure to enable advertising on the machine running as
  peripheral (I use btmgmt tool for this).

Best Regards,
Anderson Lizardo

Anderson Lizardo (3):
  attrib-server: Remove unnecessary fields from struct gatt_channel
  core: Fix associating a GAttrib to a device on incoming connections
  alert: Only remove attio callback after ATT request was sent

 profiles/alert/server.c | 18 +++++++++++++++++-
 src/attrib-server.c     | 45 +++++++++++++++++++++++++++++----------------
 src/attrib-server.h     |  1 +
 src/device.c            |  5 +++++
 4 files changed, 52 insertions(+), 17 deletions(-)

-- 
1.8.3.2


^ permalink raw reply

* Re: [PATCH] android/pts: PTS test results for HID
From: Szymon Janc @ 2014-01-28 15:39 UTC (permalink / raw)
  To: Sebastian Chlad; +Cc: linux-bluetooth
In-Reply-To: <1390916262-8022-1-git-send-email-sebastianx.chlad@intel.com>

Hi Sebastian,

On Tuesday 28 of January 2014 15:37:42 Sebastian Chlad wrote:
> ---
>  android/pts-hid.txt | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/android/pts-hid.txt b/android/pts-hid.txt
> index 7e9f986..5208d92 100644
> --- a/android/pts-hid.txt
> +++ b/android/pts-hid.txt
> @@ -1,7 +1,7 @@
>  PTS test results for DID
> 
> -PTS version: 4.9
> -Tested: 14.11.2013
> +PTS version: 5.0
> +Tested: 28.01.2014
> 
>  Results:
>  PASS	test passed
> @@ -13,7 +13,8 @@ N/A	test is disabled due to PICS setup
>  Test Name		Result	Notes
>  ---------------------------------------------------------------------------
> ---- TC_HOS_HCE_BV_01_I	PASS
> -TC_HOS_HCE_BV_02_I	PASS
> +TC_HOS_HCE_BV_02_I	PASS	IUT must be connectable
> +					(i.e. btmgmt connectable on)

Isn't enabling BT enough for this test to pass?

>  TC_HOS_HCE_BV_03_I	PASS
>  TC_HOS_HCE_BV_04_I	PASS
>  TC_HOS_HCR_BV_01_I	PASS

-- 
BR
Szymon Janc

^ permalink raw reply

* Re: [PATCH 1/3] android/pan: Fix control state change callback parameters order
From: Szymon Janc @ 2014-01-28 15:30 UTC (permalink / raw)
  To: Ravi kumar Veeramally; +Cc: linux-bluetooth
In-Reply-To: <1390484367-6332-1-git-send-email-ravikumar.veeramally@linux.intel.com>

Hi Ravi,

On Thursday 23 of January 2014 15:39:25 Ravi kumar Veeramally wrote:
> Callback declared in bt_pan.h is
> 'typedef void (*btpan_control_state_callback)
> (btpan_control_state_t state, bt_status_t error, int local_role,
> const char* ifname);
> 
> But PanService.Java defined it wrong way.
> private void onControlStateChanged(int local_role, int state,
> int error, String ifname).
> First and third parameters are misplaced, so sending data according
> to PanService.Java, discard this fix if issue fixed in PanService.Java.
> ---
>  android/hal-pan.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/android/hal-pan.c b/android/hal-pan.c
> index 8c0f8d8..a596ffd 100644
> --- a/android/hal-pan.c
> +++ b/android/hal-pan.c
> @@ -45,9 +45,18 @@ static void handle_ctrl_state(void *buf, uint16_t len)
>  {
>  	struct hal_ev_pan_ctrl_state *ev = buf;
> 
> +	/* FIXME: Callback declared in bt_pan.h is 'typedef void
> +	 * (*btpan_control_state_callback)(btpan_control_state_t state,
> +	 * bt_status_t error, int local_role, const char* ifname);
> +	 * But PanService.Java defined it wrong way.
> +	 * private void onControlStateChanged(int local_role, int state,
> +	 * int error, String ifname).
> +	 * First and third parameters are misplaced, so sending data according
> +	 * to PanService.Java, fix this if issue fixed in PanService.Java.
> +	 */
>  	if (cbs->control_state_cb)
> -		cbs->control_state_cb(ev->state, ev->status,
> -					ev->local_role, (char *)ev->name);
> +		cbs->control_state_cb(ev->local_role, ev->state, ev->status,
> +							(char *)ev->name);
>  }
> 
>  /* handlers will be called from notification thread context,

Patch 1 and 2 applied after errno handling fixes, but 3rd should be split to 
network and android part.

-- 
BR
Szymon Janc

^ permalink raw reply

* Re: [RFC] android/avctp: Move struct definitions to header
From: Luiz Augusto von Dentz @ 2014-01-28 14:56 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <1390912485-16357-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

Hi Andrei,

On Tue, Jan 28, 2014 at 4:34 AM, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> There is currently inconsistence in the avctp code with
> AVC_HEADER_LENGTH defined in avctp.h but AVCTP_HEADER_LENGTH defined in
> avctp.c. The patch moves structure definitions to the header in
> consistent way.

I wonder why you did not do the opposite, move AVC_HEADER_LENGTH into
avctp.c since the AVC packet control is all done inside avctp.c it
should probably not be exposed.

^ permalink raw reply

* [PATCH] android/pts: PTS test results for DID
From: Sebastian Chlad @ 2014-01-28 13:40 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian Chlad

---
 android/pts-did.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/pts-did.txt b/android/pts-did.txt
index c44f56c..d764f09 100644
--- a/android/pts-did.txt
+++ b/android/pts-did.txt
@@ -1,7 +1,7 @@
 PTS test results for DID
 
 PTS version: 5.0
-Tested: 11.12.2013
+Tested: 28.01.2014
 
 Results:
 PASS	test passed
-- 
1.8.3.2

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply related

* [PATCH] android/pts: PTS test results for HID
From: Sebastian Chlad @ 2014-01-28 13:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian Chlad

---
 android/pts-hid.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/android/pts-hid.txt b/android/pts-hid.txt
index 7e9f986..5208d92 100644
--- a/android/pts-hid.txt
+++ b/android/pts-hid.txt
@@ -1,7 +1,7 @@
 PTS test results for DID
 
-PTS version: 4.9
-Tested: 14.11.2013
+PTS version: 5.0
+Tested: 28.01.2014
 
 Results:
 PASS	test passed
@@ -13,7 +13,8 @@ N/A	test is disabled due to PICS setup
 Test Name		Result	Notes
 -------------------------------------------------------------------------------
 TC_HOS_HCE_BV_01_I	PASS
-TC_HOS_HCE_BV_02_I	PASS
+TC_HOS_HCE_BV_02_I	PASS	IUT must be connectable
+					(i.e. btmgmt connectable on)
 TC_HOS_HCE_BV_03_I	PASS
 TC_HOS_HCE_BV_04_I	PASS
 TC_HOS_HCR_BV_01_I	PASS
-- 
1.8.3.2

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply related

* [PATCH 6/6] avctp: Fix wrong error message
From: Andrei Emeltchenko @ 2014-01-28 13:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390915365-4335-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

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

---
 profiles/audio/avctp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 0a1a457..9f87859 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -933,7 +933,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
 
 	ret -= AVCTP_HEADER_LENGTH;
 	if (ret < AVC_HEADER_LENGTH) {
-		error("Too small AVCTP packet");
+		error("Too small AVC packet");
 		goto failed;
 	}
 
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 5/6] avctp: Use predefined HEADER_LENGTH instead of sizeof
From: Andrei Emeltchenko @ 2014-01-28 13:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390915365-4335-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

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

Make code consistent with using HEADER_LENGTH already defined and used
instead of sizeof(). Remove also ugly type conversion.
---
 profiles/audio/avctp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 570d609..0a1a457 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -924,24 +924,24 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
 	if (ret <= 0)
 		goto failed;
 
-	if ((unsigned int) ret < sizeof(struct avctp_header)) {
+	if (ret < AVCTP_HEADER_LENGTH) {
 		error("Too small AVCTP packet");
 		goto failed;
 	}
 
 	avctp = (struct avctp_header *) buf;
 
-	ret -= sizeof(struct avctp_header);
-	if ((unsigned int) ret < sizeof(struct avc_header)) {
+	ret -= AVCTP_HEADER_LENGTH;
+	if (ret < AVC_HEADER_LENGTH) {
 		error("Too small AVCTP packet");
 		goto failed;
 	}
 
-	avc = (struct avc_header *) (buf + sizeof(struct avctp_header));
+	avc = (struct avc_header *) (buf + AVCTP_HEADER_LENGTH);
 
-	ret -= sizeof(struct avc_header);
+	ret -= AVC_HEADER_LENGTH;
 
-	operands = (uint8_t *) avc + sizeof(struct avc_header);
+	operands = (uint8_t *) avc + AVC_HEADER_LENGTH;
 	operand_count = ret;
 
 	if (avctp->cr == AVCTP_RESPONSE) {
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 4/6] avctp: trivial: Do not break short line
From: Andrei Emeltchenko @ 2014-01-28 13:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390915365-4335-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

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

---
 profiles/audio/avctp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 78bf1fd..570d609 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -904,8 +904,7 @@ failed:
 	return FALSE;
 }
 
-static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
-				gpointer data)
+static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
 {
 	struct avctp *session = data;
 	struct avctp_channel *control = session->control;
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 3/6] avctp: Use already calculated avc header
From: Andrei Emeltchenko @ 2014-01-28 13:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390915365-4335-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

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

This removes long (81 characters) line as a side effect.
---
 profiles/audio/avctp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 6fd1454..78bf1fd 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -942,7 +942,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
 
 	ret -= sizeof(struct avc_header);
 
-	operands = buf + sizeof(struct avctp_header) + sizeof(struct avc_header);
+	operands = (uint8_t *) avc + sizeof(struct avc_header);
 	operand_count = ret;
 
 	if (avctp->cr == AVCTP_RESPONSE) {
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 2/6] android/avctp: Fix wrong error message
From: Andrei Emeltchenko @ 2014-01-28 13:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <1390915365-4335-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

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

---
 android/avctp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/avctp.c b/android/avctp.c
index 4ebf2ff..d308ec1 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -827,7 +827,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
 
 	ret -= AVCTP_HEADER_LENGTH;
 	if (ret < AVC_HEADER_LENGTH) {
-		error("Too small AVCTP packet");
+		error("Too small AVC packet");
 		goto failed;
 	}
 
-- 
1.8.3.2


^ 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