Linux bluetooth development
 help / color / mirror / Atom feed
* 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

* [PATCH 1/6] android/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 defined. Remove also type
conversion.
---
 android/avctp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/android/avctp.c b/android/avctp.c
index 6f9b33b..4ebf2ff 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -818,24 +818,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 0/6] Small set of AVCTP fixes
From: Andrei Emeltchenko @ 2014-01-28 13:22 UTC (permalink / raw)
  To: linux-bluetooth

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

AVCTP issues found during writing test cases.

Andrei Emeltchenko (6):
  android/avctp: Use predefined HEADER_LENGTH instead of sizeof
  android/avctp: Fix wrong error message
  avctp: Use already calculated avc header
  avctp: trivial: Do not break short line
  avctp: Use predefined HEADER_LENGTH instead of sizeof
  avctp: Fix wrong error message

 android/avctp.c        | 14 +++++++-------
 profiles/audio/avctp.c | 17 ++++++++---------
 2 files changed, 15 insertions(+), 16 deletions(-)

-- 
1.8.3.2


^ permalink raw reply

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

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

* [RFC] android/avctp: Move struct definitions to header
From: Andrei Emeltchenko @ 2014-01-28 12:34 UTC (permalink / raw)
  To: linux-bluetooth

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.
---
 android/avctp.c | 42 ------------------------------------------
 android/avctp.h | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/android/avctp.c b/android/avctp.c
index af2046a..7aa0673 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -66,48 +66,6 @@
 #define AVCTP_PACKET_CONTINUE	2
 #define AVCTP_PACKET_END	3
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-
-struct avctp_header {
-	uint8_t ipid:1;
-	uint8_t cr:1;
-	uint8_t packet_type:2;
-	uint8_t transaction:4;
-	uint16_t pid;
-} __attribute__ ((packed));
-#define AVCTP_HEADER_LENGTH 3
-
-struct avc_header {
-	uint8_t code:4;
-	uint8_t _hdr0:4;
-	uint8_t subunit_id:3;
-	uint8_t subunit_type:5;
-	uint8_t opcode;
-} __attribute__ ((packed));
-
-#elif __BYTE_ORDER == __BIG_ENDIAN
-
-struct avctp_header {
-	uint8_t transaction:4;
-	uint8_t packet_type:2;
-	uint8_t cr:1;
-	uint8_t ipid:1;
-	uint16_t pid;
-} __attribute__ ((packed));
-#define AVCTP_HEADER_LENGTH 3
-
-struct avc_header {
-	uint8_t _hdr0:4;
-	uint8_t code:4;
-	uint8_t subunit_type:5;
-	uint8_t subunit_id:3;
-	uint8_t opcode;
-} __attribute__ ((packed));
-
-#else
-#error "Unknown byte order"
-#endif
-
 struct avctp_control_req {
 	struct avctp_pending_req *p;
 	uint8_t code;
diff --git a/android/avctp.h b/android/avctp.h
index a22bf13..428eeb8 100644
--- a/android/avctp.h
+++ b/android/avctp.h
@@ -26,7 +26,6 @@
 #define AVCTP_BROWSING_PSM		27
 
 #define AVC_MTU 512
-#define AVC_HEADER_LENGTH 3
 
 /* ctype entries */
 #define AVC_CTYPE_CONTROL		0x0
@@ -80,6 +79,50 @@
 #define AVC_F3				0x73
 #define AVC_F4				0x74
 
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+struct avctp_header {
+	uint8_t ipid:1;
+	uint8_t cr:1;
+	uint8_t packet_type:2;
+	uint8_t transaction:4;
+	uint16_t pid;
+} __attribute__ ((packed));
+#define AVCTP_HEADER_LENGTH 3
+
+struct avc_header {
+	uint8_t code:4;
+	uint8_t _hdr0:4;
+	uint8_t subunit_id:3;
+	uint8_t subunit_type:5;
+	uint8_t opcode;
+} __attribute__ ((packed));
+#define AVC_HEADER_LENGTH 3
+
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+struct avctp_header {
+	uint8_t transaction:4;
+	uint8_t packet_type:2;
+	uint8_t cr:1;
+	uint8_t ipid:1;
+	uint16_t pid;
+} __attribute__ ((packed));
+#define AVCTP_HEADER_LENGTH 3
+
+struct avc_header {
+	uint8_t _hdr0:4;
+	uint8_t code:4;
+	uint8_t subunit_type:5;
+	uint8_t subunit_id:3;
+	uint8_t opcode;
+} __attribute__ ((packed));
+#define AVC_HEADER_LENGTH 3
+
+#else
+#error "Unknown byte order"
+#endif
+
 struct avctp;
 
 typedef bool (*avctp_passthrough_cb) (struct avctp *session,
-- 
1.8.3.2


^ permalink raw reply related

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

---
 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
-- 
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 A2DP
From: Sebastian Chlad @ 2014-01-28 12:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian Chlad

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

* Re: [RFC] Initial avctp test
From: Marcel Holtmann @ 2014-01-28 12:10 UTC (permalink / raw)
  To: Andrei Emeltchenko
  Cc: Luiz Augusto von Dentz, linux-bluetooth@vger.kernel.org
In-Reply-To: <20140128103641.GB9043@aemeltch-MOBL1>

Hi Andrei,

>>> This is initial invalid packet size test, sent as RFC since I am not
>>> sure what might be tested for avctp.
>>> 
>>> Andrei Emeltchenko (1):
>>>  unit/avctp: Add initial AVCTP test setup
>>> 
>>> Makefile.am       |   8 ++
>>> unit/test-avctp.c | 262 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 270 insertions(+)
>>> create mode 100644 unit/test-avctp.c
>>> 
>>> --
>>> 1.8.3.2
>> 
>> You should follow the testing spec:
>> https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=40404
>> 
>> Please follow the same name convention that is used by the testing
>> spec and for now do not introduce any other test that is not part of
>> the testing spec.
> 
> I have this AVCTP.TS spec but what might be tested for example with test
> case "TP/CCM/BV-01-C"?
> 
> Even looking at session_cb() for AVCTP there seems to be only packet
> length check. In contrast for AVDTP there is command parser so you might
> be able to test something.
> 
> Shall we test AVRCP instead?

AVRCP and AVCTP need to be tested. This is not one or the other. It is both.

Regards

Marcel


^ permalink raw reply

* Re: [PATCH v3 0/4] Regression fixes for rfcomm/tty.c
From: Marcel Holtmann @ 2014-01-28 12:08 UTC (permalink / raw)
  To: Gianluca Anzolin
  Cc: Alexander Holler, Gustavo F. Padovan, peter,
	linux-bluetooth@vger.kernel.org development, Greg KH, jslaby,
	stable
In-Reply-To: <20140128083154.GA29060@sottospazio.it>

Hi Gianluca,

>>>> all 4 patches have been applied to bluetooth-next tree.
>>> 
>>> Maybe a bit late, but I've just seen they miss a Cc: stable@vger.kernel.org to automatically end up in 3.12 and 3.13 too.
>> 
>> we can always promote them to stable. On Purpose I wanted them to cycle through bluetooth-next for a while to make sure they do not cause any other regressions.
>> 
> 
> Unfortunately it seems I overlooked the fact that rfcomm_dev_activate() is
> called with the port->mutex held. So patches 2/3/4 cause a regression I missed
> because I didn't turn on the appropriate debug options (circular locking
> dependency, a bug report already appeared on this list).
> 
> I'm afraid this all stems from my partial knowledge of the tty_port code and
> unfortunately I don't know how to solve the problem right now.
> 
> I think it's better to revert those patches for the moment.

can we get this fixed instead. If I revert them, I have a different issue. So I am trading one bug for another one.

Regards

Marcel


^ permalink raw reply

* Re: [PATCH BlueZ v2 1/4] android/AVDTP: Make signalling channel priority 6
From: Marcel Holtmann @ 2014-01-28 12:05 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: BlueZ development
In-Reply-To: <1390889820-24709-1-git-send-email-luiz.dentz@gmail.com>

Hi Luiz,

> 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.
> 
> android/avdtp.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/android/avdtp.c b/android/avdtp.c
> index 4abcd75..4cfffc8 100644
> --- a/android/avdtp.c
> +++ b/android/avdtp.c
> @@ -2057,6 +2057,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 priority;

make it “int new_fd, priority;”.

> 
> 	new_fd = dup(fd);
> 	if (new_fd < 0) {
> @@ -2064,6 +2065,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,
> +			(const void *) &priority, sizeof(priority)) < 0) {

What is this (const void *) cast for. That should not be needed.

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

Regards

Marcel


^ permalink raw reply

* Re: [RFC] Initial avctp test
From: Andrei Emeltchenko @ 2014-01-28 10:36 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <CABBYNZKusSmbTTEVLmU2Xa4+L5dOaKCHt8dFaeT2jP_==uL+jw@mail.gmail.com>

Hi Luiz,

On Mon, Jan 27, 2014 at 10:36:42AM -0800, Luiz Augusto von Dentz wrote:
> Hi Andrei,
> 
> On Mon, Jan 27, 2014 at 7:56 AM, Andrei Emeltchenko
> <Andrei.Emeltchenko.news@gmail.com> wrote:
> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >
> > This is initial invalid packet size test, sent as RFC since I am not
> > sure what might be tested for avctp.
> >
> > Andrei Emeltchenko (1):
> >   unit/avctp: Add initial AVCTP test setup
> >
> >  Makefile.am       |   8 ++
> >  unit/test-avctp.c | 262 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 270 insertions(+)
> >  create mode 100644 unit/test-avctp.c
> >
> > --
> > 1.8.3.2
> 
> You should follow the testing spec:
> https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=40404
> 
> Please follow the same name convention that is used by the testing
> spec and for now do not introduce any other test that is not part of
> the testing spec.

I have this AVCTP.TS spec but what might be tested for example with test
case "TP/CCM/BV-01-C"?

Even looking at session_cb() for AVCTP there seems to be only packet
length check. In contrast for AVDTP there is command parser so you might
be able to test something.

Shall we test AVRCP instead?

Best regards 
Andrei Emeltchenko 

^ permalink raw reply


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