Skip to contentSkip to conversation

HT820, capture and eSCO

Bluez-devel Guillaume Bedot 2 participants 6 messages Jan 26, 2008 – Jan 28, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

I have issues using "voice"/HSP/HFP profiles with this headset and latest kernels/bluez cvs.

It seems it tries to use extended SCO when it shouldn't...

hcitool info xx:xx:xx:xx:xx:xx
Requesting information ...
BD Address: xx:xx:xx:xx:xx:xx
Device Name: Motorola HT820
LMP Version: 2.0 (0x3) LMP Subversion: 0xa41
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xff 0xff 0x8b 0x78 0x18 0x18 0x00 0x80
<3-slot packets> <5-slot packets> <encryption> <slot offset> <timing accuracy> <role switch> <hold mode> <sniff mode> <park state> <RSSI> <channel quality> <SCO link> <HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> <transparent SCO> <broadcast encrypt> <enhanced iscan> <interlaced iscan> <interlaced pscan> <inquiry with RSSI> <AFH cap. slave> <AFH class. slave> <AFH cap. master> <AFH class. master> <extended features>

An other headset which support eSCO, works fine :

hcitool info xx:xx:xx:xx:xx:xx
Requesting information ...
BD Address: xx:xx:xx:xx:xx:xx
Device Name: PROF PBH-6W
LMP Version: 2.0 (0x3) LMP Subversion: 0x978
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xfd 0xfe 0x8f 0x80 0x0b 0xa8 0x00 0x80
<3-slot packets> <encryption> <slot offset> <timing accuracy> <role switch> <hold mode> <sniff mode> <RSSI> <channel quality> <SCO link> <HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> <power control> <transparent SCO> <broadcast encrypt> <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave> <AFH cap. master> <EDR eSCO 2 Mbps> <3-slot EDR eSCO> <extended features>

What can I do to help now ?

Best regards,

Guillaume B.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw
Quoted 7 lines · Guillaume Bedot

Hello,

I have issues using "voice"/HSP/HFP profiles with this headset and latest kernels/bluez cvs.

It seems it tries to use extended SCO when it shouldn't...

Quoted 15 lines

hcitool info xx:xx:xx:xx:xx:xx
Requesting information ...
BD Address: xx:xx:xx:xx:xx:xx
Device Name: Motorola HT820
LMP Version: 2.0 (0x3) LMP Subversion: 0xa41
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xff 0xff 0x8b 0x78 0x18 0x18 0x00 0x80
<3-slot packets> <5-slot packets> <encryption> <slot offset> <timing accuracy> <role switch> <hold mode> <sniff mode> <park state> <RSSI> <channel quality> <SCO link> <HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> <transparent SCO> <broadcast encrypt> <enhanced iscan> <interlaced iscan> <interlaced pscan> <inquiry with RSSI> <AFH cap. slave> <AFH class. slave> <AFH cap. master> <AFH class. master> <extended features>

If it can help, I noticed there are a lot of these messages in syslog :

Jan 26 07:52:05 littletux kernel: hci_scodata_packet: hci0 SCO packet

for unknown connection handle 1

And with "hifi" profile, the headset playback works although it seems to use eSCO too :

hcitool con
Connections:
> ACL xx:xx:xx:xx:xx:xx handle 11 state 1 lm SLAVE AUTH ENCRYPT SECURE < eSCO xx:xx:xx:xx:xx:xx handle 0 state 8 lm SLAVE

I'm not sure what the problem is anymore...

Best regards,

Guillaume B.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

U29ycnkgZm9yIHRyaXBsZSBwb3N0aW5nIC4uLgoKTGUgc2FtZWRpIDI2IGphbnZpZXIgMjAwOCDD oCAxMDowMSArMDEwMCwgR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FWRSBBVVRIIEVOQ1JZUFQKU0VDVVJFIAoKU28sIGhvdyBjYW4gSSBmb3JjZSB1 c2Ugb2YgU0NPIGluc3RlYWQgb2YgZVNDTyA/CgpCZXN0IHJlZ2FyZHMsCgpHdWlsbGF1bWUgQi4K CgotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tClRoaXMgU0YubmV0IGVtYWlsIGlzIHNwb25zb3JlZCBieTogTWlj cm9zb2Z0CkRlZnkgYWxsIGNoYWxsZW5nZXMuIE1pY3Jvc29mdChSKSBWaXN1YWwgU3R1ZGlvIDIw MDguCmh0dHA6Ly9jbGsuYXRkbXQuY29tL01SVC9nby92c2UwMTIwMDAwMDcwbXJ0L2RpcmVjdC8w MS8KX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KQmx1ZXot ZGV2ZWwgbWFpbGluZyBsaXN0CkJsdWV6LWRldmVsQGxpc3RzLnNvdXJjZWZvcmdlLm5ldApodHRw czovL2xpc3RzLnNvdXJjZWZvcmdlLm5ldC9saXN0cy9saXN0aW5mby9ibHVlei1kZXZlbAo=

#3 lore raw

Re,

An other (ugly?) patch that fixes this issue for me.

There are an other case, for incoming connections (headset->dongle), I guess, which is not taken into account, because i'm not sure what to do / how to test.

Best regards,

Guillaume B.

bluetooth/hci_conn.c renamed from bluetooth/hci_conn.c.orig +6 -1
@@ -332,6 +332,11 @@
 	if (type == ACL_LINK)
 		return acl;
 
+	if (lmp_esco_capable(hdev) && lmp_esco_capable(acl)) {
+		type=ESCO_LINK;
+	} else {
+		type=SCO_LINK;
+	}
 	if (!(sco = hci_conn_hash_lookup_ba(hdev, type, dst))) {
 		if (!(sco = hci_conn_add(hdev, type, dst))) {
 			hci_conn_put(acl);
@@ -346,7 +351,7 @@
 
 	if (acl->state == BT_CONNECTED &&
 			(sco->state == BT_OPEN || sco->state == BT_CLOSED)) {
-		if (lmp_esco_capable(hdev))
+		if (type==ESCO_LINK)
 			hci_setup_sync(sco, acl->handle);
 		else
 			hci_add_sco(sco, acl->handle);
bluetooth/sco.c renamed from bluetooth/sco.c.orig +2 -4
@@ -189,7 +189,7 @@
 	struct sco_conn *conn;
 	struct hci_conn *hcon;
 	struct hci_dev  *hdev;
-	int err, type;
+	int err;
 
 	BT_DBG("%s -> %s", batostr(src), batostr(dst));
 
@@ -200,9 +200,7 @@
 
 	err = -ENOMEM;
 
-	type = lmp_esco_capable(hdev) ? ESCO_LINK : SCO_LINK;
-
-	hcon = hci_connect(hdev, type, dst);
+	hcon = hci_connect(hdev, SCO_LINK, dst);
 	if (!hcon)
 		goto done;
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw

Re,

New version of the patch with some unneeded lines removed.

Regards,

Guillaume B.

bluetooth/hci_conn.c renamed from bluetooth/hci_conn.c.orig +3 -1
@@ -332,6 +332,8 @@
 	if (type == ACL_LINK)
 		return acl;
 
+	if (lmp_esco_capable(hdev) && lmp_esco_capable(acl))
+		type=ESCO_LINK;
 	if (!(sco = hci_conn_hash_lookup_ba(hdev, type, dst))) {
 		if (!(sco = hci_conn_add(hdev, type, dst))) {
 			hci_conn_put(acl);
@@ -346,7 +351,7 @@
 
 	if (acl->state == BT_CONNECTED &&
 			(sco->state == BT_OPEN || sco->state == BT_CLOSED)) {
-		if (lmp_esco_capable(hdev))
+		if (type==ESCO_LINK)
 			hci_setup_sync(sco, acl->handle);
 		else
 			hci_add_sco(sco, acl->handle);
bluetooth/sco.c renamed from bluetooth/sco.c.orig +2 -4
@@ -189,7 +189,7 @@
 	struct sco_conn *conn;
 	struct hci_conn *hcon;
 	struct hci_dev  *hdev;
-	int err, type;
+	int err;
 
 	BT_DBG("%s -> %s", batostr(src), batostr(dst));
 
@@ -200,9 +200,7 @@
 
 	err = -ENOMEM;
 
-	type = lmp_esco_capable(hdev) ? ESCO_LINK : SCO_LINK;
-
-	hcon = hci_connect(hdev, type, dst);
+	hcon = hci_connect(hdev, SCO_LINK, dst);
 	if (!hcon)
 		goto done;
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw

Re,

I'm really sorry, I forgot a part of the patch....

Here is a full version.

Regards,

Guillaume B.

bluetooth/hci_conn.c renamed from bluetooth/hci_conn.c.orig +3 -1
@@ -332,6 +332,8 @@
 	if (type == ACL_LINK)
 		return acl;
 
+	if (lmp_esco_capable(hdev) && lmp_esco_capable(acl))
+		type=ESCO_LINK;
 	if (!(sco = hci_conn_hash_lookup_ba(hdev, type, dst))) {
 		if (!(sco = hci_conn_add(hdev, type, dst))) {
 			hci_conn_put(acl);
@@ -346,7 +349,7 @@
 
 	if (acl->state == BT_CONNECTED &&
 			(sco->state == BT_OPEN || sco->state == BT_CLOSED)) {
-		if (lmp_esco_capable(hdev))
+		if (type==ESCO_LINK)
 			hci_setup_sync(sco, acl->handle);
 		else
 			hci_add_sco(sco, acl->handle);
bluetooth/sco.c renamed from bluetooth/sco.c.orig +2 -4
@@ -189,7 +189,7 @@
 	struct sco_conn *conn;
 	struct hci_conn *hcon;
 	struct hci_dev  *hdev;
-	int err, type;
+	int err;
 
 	BT_DBG("%s -> %s", batostr(src), batostr(dst));
 
@@ -200,9 +200,7 @@
 
 	err = -ENOMEM;
 
-	type = lmp_esco_capable(hdev) ? ESCO_LINK : SCO_LINK;
-
-	hcon = hci_connect(hdev, type, dst);
+	hcon = hci_connect(hdev, SCO_LINK, dst);
 	if (!hcon)
 		goto done;
 
bluetooth/hci_event.c renamed from bluetooth/hci_event.c.orig +1 -1
@@ -720,7 +720,7 @@
 		struct hci_conn *sco = conn->link;
 		if (sco) {
 			if (!ev->status) {
-				if (lmp_esco_capable(hdev))
+				if (lmp_esco_capable(hdev) && lmp_esco_capable(conn))
 					hci_setup_sync(sco, conn->handle);
 				else
 					hci_add_sco(sco, conn->handle);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel