From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Setting up two connections at the same time
Date: Tue, 13 Dec 2005 12:03:44 +0100 [thread overview]
Message-ID: <1134471824.29210.20.camel@blade> (raw)
In-Reply-To: <439E98E4.4010800@service2media.com>
Hi Herman,
> I am trying to develop an application which performs an inquiry and will
> then perform a service search on the found devices using multiple
> threads. This fails however because these threads all try to setup a
> connection at the same time which is not possible off course. I have
> traced the problem down to the HCI layer which sends a Command Status
> event for the first Create Connection request indicating that it has
> started the connection setup. But the Command Status event indicates to
> the host that it is ready to receive the next HCI command. However the
> next command in the queue is the second Create Connection request which
> is then sent to the HCI controller. The controller off course rejects
> this request with a status 0x0C (Command Disallowed). This error is
> propagated to the higher layers (l2cap and sdp) and eventually the
> sdp_connect fails with errno set to EBADFD.
> What is the best way to handle this situation? The EBADFD doesn't really
> indicate that the application can retry the request. Wouldn't it be
> better to handle this at the host HCI layer? That is the only entity
> which can possibly keep track of the HCI controller state and perform
> the next connection request only when the Connection Complete event from
> the previous request has been received. This way the requests could be
> serialized. Or is this way too complex?
the same question came already came up some time ago. I don't know of
any Bluetooth chip that allows to establish multiple baseband links at
the same time. I personally think that such a chip will never be build,
because it is way to expensive. Once you received the Connection
Complete event you can ask the chip to establish another link to another
device. Or you simply use multiple dongles for this task.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-12-13 11:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-13 9:48 [Bluez-devel] Setting up two connections at the same time Herman Meerlo
2005-12-13 11:03 ` Marcel Holtmann [this message]
2005-12-13 12:04 ` Herman Meerlo
2005-12-13 12:17 ` Marcel Holtmann
2005-12-13 12:28 ` Herman Meerlo
2005-12-13 12:42 ` Marcel Holtmann
2005-12-13 12:50 ` Herman Meerlo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1134471824.29210.20.camel@blade \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).