Linux bluetooth development
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Missing properties during pairing, refcounting bug?
Date: Sat, 07 Dec 2013 22:39:49 +0100	[thread overview]
Message-ID: <1386452389.32408.23.camel@nuvo> (raw)
In-Reply-To: <20131207180028.GC29280@x220.p-661hnu-f1>

On Sat, 2013-12-07 at 22:00 +0400, Johan Hedberg wrote:
> Hi Bastien,
> 
> On Sat, Dec 07, 2013, Bastien Nocera wrote:
> > Johan was blaming my "slow" Bluetooth adapter for the missing Class
> > property when pairing was remote initiated,
> 
> I don't recall blaming your Bluetooth adapter, but simply concluding
> that it seems either the local or remote side is slow in doing the name
> discovery, based on the HCI log you produced. Your discovery of the
> issue going away by adding delay before replying to the PIN request
> seemed to support this conclusion.

Right. This isn't the TomTom Remote anymore, but a Sony Ericsson phone.
I'm pretty certain that I'd be able to reproduce the problem with
another adapter.

<snip>
> Yep. Device which have dev->temporary = TRUE get removed when the
> connection to them is lost.

But why is the connection lost? It seems to me that the loss is only
temporary, and part of the pairing process. Is it the reverse SDP
finishing? We shouldn't unref the device yet certainly.

>  The temporary flag in turn gets cleared upon
> successful pairing or when we've initiated some procedure through
> Device1.Connect() or Device1.Pair().
> 
> That said, I think it would make sense to apply the same policy on
> remotely initiated connections as we do for devices we've discovered but
> not yet connected to. In other words, I think we should have the same 3
> minute timer for this kind of device objects and only remove them if
> pairing didn't happen by that time. Does it sound like it might solve
> the issue?

I think 3 minutes is far too high. In this particular case, I think that
the device is getting unref'ed too early during the pairing process.

Could you walk me through the pairing process, remote initiated, for a
pre-2.1 device? I don't understand why I'm seeing a complete
disconnection from the remote device.

Cheers


      reply	other threads:[~2013-12-07 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07 12:41 Missing properties during pairing, refcounting bug? Bastien Nocera
2013-12-07 18:00 ` Johan Hedberg
2013-12-07 21:39   ` Bastien Nocera [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=1386452389.32408.23.camel@nuvo \
    --to=hadess@hadess.net \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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