Skip to contentSkip to conversation

Troubles with mulitple SCO connections (duplex)

Bluez-devel Markus Adolfsson 4 participants 8 messages Apr 4, 2007 – Apr 11, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi all,

I'd like to establish two SCO connections simultaneously using BlueZ from my "coordinator" application that in the long run will connect / mix the two SCO connections to let two headsets hear each other, as well as letting the master controller-application I'm writing to hear both headsets...

The app itself is fairly straight forward and I've gotten everything to work properly besides one little tiny detail - One SCO connection works fine, but once I connect the second SCO connection, all SCO connections goes down (without any error from the socket / connect commands)...

Both SCO-connections are still there, the headsets only hear "noise" and I have the fealing that the two headsets don't send any audio, but that they _do receive_ on the SCO connections... Strange!

Is this a packet-type issue and if so - how can I set the packet-types from "within" the BlueZ lib / my app?

Regards,
/Markus Adolfsson

Signature · 15 lines
------------------------------------------------------------------------
*Markus Adolfsson*
M.Sc.CE. Product Development
Mail: 	[email protected] <mailto:[email protected]>
Phone: 	+46 35 152268 <callto:+4635152268>
Mobile: 	+46 707 165296 <callto:+46707165296>

	
*Free2move AB* -- /WIRELESS MADE EASY/
Phone: 	+46 35 152260 <callto:+4635152260>
Fax: 	+46 35 152269 <callto:+4635152269>
Web: 	www.free2move.net <http://www.free2move.net>
Address: 	Sperlingsgatan 7
SE-30248 Halmstad
Sweden

begin:vcard
fn:Markus Adolfsson
n:Adolfsson;Markus
org:Free2move;Product Development
adr:;;Sperlingsgatan 7;Halmstad;;302 48;Sweden
email;internet:[email protected]
title:M.Sc.C.E.
tel;work:+46 35 152268
url:http://www.free2move.net
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

#1 lore raw

What you are seeing is normal. The current code only supports one connection.
It would be better if the existing code simply would fail to open a second connection to avoid a lot of confusion.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

Hi Jose,

My spontaneous reaction would be; really?

My code is based on the socket-abstraction in BlueZ and it works fine for multiple ACL connections, and the SCO-option is only a second socket-invocation on top of that...? Confusing... There has to be some way to solve this? Setting SCO packet type to HV1 allows for three simultaneous SCO connections AFAIK - so this should not be limited in BlueZ - and if it really is, then why and how do I work around that.... I mean, RF_COMM / ACL sockets work just fine...

Regards,
Markus Adolfsson

Jose Vasconcellos skrev:

Quoted 15 lines

What you are seeing is normal. The current code only supports one connection. It would be better if the existing code simply would fail to open a second connection to avoid a lot of confusion.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 15 lines
------------------------------------------------------------------------
*Markus Adolfsson*
M.Sc.CE. Product Development
Mail: 	[email protected] <mailto:[email protected]>
Phone: 	+46 35 152268 <callto:+4635152268>
Mobile: 	+46 707 165296 <callto:+46707165296>

	
*Free2move AB* -- /WIRELESS MADE EASY/
Phone: 	+46 35 152260 <callto:+4635152260>
Fax: 	+46 35 152269 <callto:+4635152269>
Web: 	www.free2move.net <http://www.free2move.net>
Address: 	Sperlingsgatan 7
SE-30248 Halmstad
Sweden

begin:vcard
fn:Markus Adolfsson
n:Adolfsson;Markus
org:Free2move;Product Development
adr:;;Sperlingsgatan 7;Halmstad;;302 48;Sweden
email;internet:[email protected]
title:M.Sc.C.E.
tel;work:+46 35 152268
url:http://www.free2move.net
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

#3 lore raw

Markus

Quoted 4 lines

My spontaneous reaction would be; really?

My code is based on the socket-abstraction in BlueZ and it works fine for multiple ACL connections

Marcel says the usb layer needs a rewrite to accommodate this. It has something to do with resource allocation on usb iirc.

It does work now on systems that use a serial hci connection (mostly embedded) but that may not help you.

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw

Hi Brad,

Ok -- that does make my life a bit easier ;)

The target-platform for my app is indeed an embedded one with a serial interface to a BT module, so that's fine... However I'm developing the app on a "real" computer using an USB dongle, but I'll try to cross-compile and go for the intended target-platform instead and keep my fingers crossed...

Thanks all for your input!
/Markus

Brad Midgley skrev:

Quoted 27 lines

Markus

Quoted 5 lines

My spontaneous reaction would be; really?

My code is based on the socket-abstraction in BlueZ and it works fine for multiple ACL connections

Marcel says the usb layer needs a rewrite to accommodate this. It has something to do with resource allocation on usb iirc.

It does work now on systems that use a serial hci connection (mostly embedded) but that may not help you.

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 15 lines
------------------------------------------------------------------------
*Markus Adolfsson*
M.Sc.CE. Product Development
Mail: 	[email protected] <mailto:[email protected]>
Phone: 	+46 35 152268 <callto:+4635152268>
Mobile: 	+46 707 165296 <callto:+46707165296>

	
*Free2move AB* -- /WIRELESS MADE EASY/
Phone: 	+46 35 152260 <callto:+4635152260>
Fax: 	+46 35 152269 <callto:+4635152269>
Web: 	www.free2move.net <http://www.free2move.net>
Address: 	Sperlingsgatan 7
SE-30248 Halmstad
Sweden

begin:vcard
fn:Markus Adolfsson
n:Adolfsson;Markus
org:Free2move;Product Development
adr:;;Sperlingsgatan 7;Halmstad;;302 48;Sweden
email;internet:[email protected]
title:M.Sc.C.E.
tel;work:+46 35 152268
url:http://www.free2move.net
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

#5 lore raw

For what it's worth;

After having cross-compiled to my embedded system and leaving the USB-dongle solution behind, everything now works like a breeze and I now have a BT device hosting running 2 SCO connections and 3 RF_COMM sockets simultaneously.

Thanks for your help along the way!
/Markus

Markus Adolfsson skrev:

Quoted 67 lines

Hi Brad,

Ok -- that does make my life a bit easier ;)

The target-platform for my app is indeed an embedded one with a serial interface to a BT module, so that's fine... However I'm developing the app on a "real" computer using an USB dongle, but I'll try to cross-compile and go for the intended target-platform instead and keep my fingers crossed...

Thanks all for your input!
/Markus

Brad Midgley skrev:

Quoted 27 lines

Markus

Quoted 5 lines

My spontaneous reaction would be; really?

My code is based on the socket-abstraction in BlueZ and it works fine for multiple ACL connections

Marcel says the usb layer needs a rewrite to accommodate this. It has something to do with resource allocation on usb iirc.

It does work now on systems that use a serial hci connection (mostly embedded) but that may not help you.

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 27 lines
------------------------------------------------------------------------
*Markus Adolfsson*
M.Sc.CE. Product Development
Mail: 	[email protected] <mailto:[email protected]>
Phone: 	+46 35 152268 <callto:+4635152268>
Mobile: 	+46 707 165296 <callto:+46707165296>

	
*Free2move AB* -- /WIRELESS MADE EASY/
Phone: 	+46 35 152260 <callto:+4635152260>
Fax: 	+46 35 152269 <callto:+4635152269>
Web: 	www.free2move.net <http://www.free2move.net>
Address: 	Sperlingsgatan 7
SE-30248 Halmstad
Sweden

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Signature · 15 lines
------------------------------------------------------------------------
*Markus Adolfsson*
M.Sc.CE. Product Development
Mail: 	[email protected] <mailto:[email protected]>
Phone: 	+46 35 152268 <callto:+4635152268>
Mobile: 	+46 707 165296 <callto:+46707165296>

	
*Free2move AB* -- /WIRELESS MADE EASY/
Phone: 	+46 35 152260 <callto:+4635152260>
Fax: 	+46 35 152269 <callto:+4635152269>
Web: 	www.free2move.net <http://www.free2move.net>
Address: 	Sperlingsgatan 7
SE-30248 Halmstad
Sweden

begin:vcard
fn:Markus Adolfsson
n:Adolfsson;Markus
org:Free2move;Product Development
adr:;;Sperlingsgatan 7;Halmstad;;302 48;Sweden
email;internet:[email protected]
title:M.Sc.C.E.
tel;work:+46 35 152268
url:http://www.free2move.net
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

#6 lore raw
Quoted 3 lines

For what it's worth;

After having cross-compiled to my embedded system and leaving the

USB-dongle solution behind, everything now works like a breeze and I now have a BT device hosting running 2 SCO connections and 3 RF_COMM sockets simultaneously.

And what packet types are these two SCO connectionis using now?

-Mayank

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#7 lore raw

I actually set the packet-types to "ALL SCO" and let stack do its magic work according to your suggestions, but in reality it turned out to use HV3 which makes sense as that imply (AFAIK) that 2/3 of the bandwidth is used for the two SCO connections, leaving 1/3 left for the 3 RF_COMM connections.

/Markus

Mayank BATRA skrev:

Quoted 25 lines
Quoted 6 lines

For what it's worth;

After having cross-compiled to my embedded system and leaving the

USB-dongle solution behind, everything now works like a breeze and I now have a BT device hosting running 2 SCO connections and 3 RF_COMM sockets simultaneously.

And what packet types are these two SCO connectionis using now?

-Mayank

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 15 lines
------------------------------------------------------------------------
*Markus Adolfsson*
M.Sc.CE. Product Development
Mail: 	[email protected] <mailto:[email protected]>
Phone: 	+46 35 152268 <callto:+4635152268>
Mobile: 	+46 707 165296 <callto:+46707165296>

	
*Free2move AB* -- /WIRELESS MADE EASY/
Phone: 	+46 35 152260 <callto:+4635152260>
Fax: 	+46 35 152269 <callto:+4635152269>
Web: 	www.free2move.net <http://www.free2move.net>
Address: 	Sperlingsgatan 7
SE-30248 Halmstad
Sweden

begin:vcard
fn:Markus Adolfsson
n:Adolfsson;Markus
org:Free2move;Product Development
adr:;;Sperlingsgatan 7;Halmstad;;302 48;Sweden
email;internet:[email protected]
title:M.Sc.C.E.
tel;work:+46 35 152268
url:http://www.free2move.net
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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