public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] sdp_connect thread safe?
Date: Fri, 30 Jun 2006 12:55:51 +0200	[thread overview]
Message-ID: <1151664951.20305.41.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.63.0606301230090.18028@redbean.intranet.gw-instruments.de>

Hi Peter,

> > > The normal behaviour is that the chip will reply with an error event (like 
> > > command dissallowed) for the second connection attempt. I think there was 
> > > some discussion about this some time ago. The only way to come around this 
> > > is a complicated buffering for HCI commands inside BlueZ. It will require 
> > > the stack to hold a create connection command in the queue when it gets an 
> > > error response for a create connection command and re-issue it once it 
> > > gets an connection complete or connection fail event.
> > 
> > if you wanna really support this, then you have to implement it in the
> > L2CAP layer. Doing it inside HCI would mess up a lot of things and I
> > would always reject this. However feel free to send in patches to
> > implement this inside L2CAP.
> 
> No, I don't want to implement this. We've done this once for a project 
> (not BlueZ related) and it was a pain ;-). May be you're right that L2CAP 
> is the appropriate layer because it is connection oriented. But 
> currently my knowledge about the insides of BlueZ is simply to small to 
> comment on this.  

doing it on HCI level can easily mess up things and as I said, I would
reject any attempt to push such thing into the mainline kernel.

However I am open for a L2CAP based solution. Actually is not that
complex. Take a look at l2cap_connect_cfm() and in case of a specific
error you need to issue l2cap_do_connect() again. Now you only need to
take care of the correct timeout handling and stop after for example
three failed attempts to avoid an endless loop.

Regards

Marcel



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2006-06-30 10:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-30  8:49 [Bluez-devel] sdp_connect thread safe? Fabrizio Guglielmino
2006-06-30  8:53 ` Marcel Holtmann
2006-06-30  9:06   ` Fabrizio Guglielmino
2006-06-30  9:12     ` Marcel Holtmann
2006-06-30  9:43       ` Fabrizio Guglielmino
2006-06-30 10:06         ` Marcel Holtmann
2006-06-30 10:25         ` Peter Wippich
2006-06-30 10:14       ` Peter Wippich
2006-06-30 10:22         ` Fabrizio Guglielmino
2006-06-30 10:36           ` Peter Wippich
2006-06-30 10:49             ` Fabrizio Guglielmino
2006-06-30 10:23         ` Marcel Holtmann
2006-06-30 10:36           ` Peter Wippich
2006-06-30 10:55             ` Marcel Holtmann [this message]

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=1151664951.20305.41.camel@localhost \
    --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