All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike <puffy.taco@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: media transport -- when is acquire ok to call?
Date: Mon, 26 Mar 2012 10:44:39 -0500	[thread overview]
Message-ID: <CAB7rCTgJrxKZurWVq7ixt7NGJ6D6d-urtYe3UDKR+9bxQdgdEQ@mail.gmail.com> (raw)
In-Reply-To: <CABBYNZJNFCBdOzLHX2LMTeULkyhCEHsGv+_41wUsvTrhCL48YQ@mail.gmail.com>

Hi Luiz,

On Mon, Mar 26, 2012 at 10:01 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Hi Mike,
>
> On Fri, Mar 23, 2012 at 12:30 PM, Mike <puffy.taco@gmail.com> wrote:
>> It does appear to trigger based on the signalling channel, however it
>> appears that the connection process continues on regardless.  I pasted
>> below a log, everything in the log occurs while my phone is still
>> asking me if I want to pair with the BlueZ device.  We don't get
>> beyond the OPEN_CMD into an actual OPEN state until the pairing
>> process completes.
>
> Why don't you pair it before hand, actually this should happen only
> once in the first time you pair and then it should be stored
> persistently so the next time you wont see this problem.

True, but I'm testing all the possible user experiences and that's not
an acceptable solution.  The particular case I'm testing is that the
user deleted the pairing on one end but not the other.  I can't
control what the software on my phone does; I'm only reporting how it
interacts with BlueZ running on my device.  It's true that the next
time the connection occurs (provided we eventually figure out a SEP
lock fix), everything will work just fine.  I'm just trying to figure
out what goes wrong the first time.  So any pointers you have would be
great.

>>> 60 seconds is way too long, it should be at least smaller than D-Bus
>>> default timeout which is 25 sec.
>>
>> What exactly is this timeout waiting for?  I haven't figured that out
>> yet.  I assume it's waiting on something from my phone (the a2dp
>> source) and not D-Bus?
>
> The client is would be waiting the reply of Acquire, so if you setup
> something over D-Bus timeout there is a chance the device respond
> correctly but the client will ignored because the method call already
> timed out.

Well, this case helps out in a time where I didn't call Acquire (the
phone initiated the connection).  So it seems like there should be a
check for pairing before initiating the timer.  I'm not sure how that
would work or what would be needed to make that foolproof.  For my
situation, a much higher timeout was sufficient (I'm not saying that
it should be set to 60 in bluez.git -- just that for me it works).

  reply	other threads:[~2012-03-26 15:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 19:02 media transport -- when is acquire ok to call? Mike
2012-03-22 17:18 ` Luiz Augusto von Dentz
2012-03-22 20:53   ` Mike
2012-03-22 21:21     ` Mike
2012-03-23 13:49       ` Dalleau, Frederic
     [not found]       ` <CABBYNZK5yFoR9nGjU8=U4g+VkLc281Hh9QhYT5m9hTxoZLFoaw@mail.gmail.com>
2012-03-23 15:30         ` Mike
2012-03-26 15:01           ` Luiz Augusto von Dentz
2012-03-26 15:44             ` Mike [this message]
2012-03-26 16:40               ` Luiz Augusto von Dentz
2012-03-26 16:49                 ` Mike
2012-03-23 17:51   ` Mike
2012-03-26 14:41     ` Luiz Augusto von Dentz
2012-03-26 16:10       ` Mike
2012-03-26 17:01         ` Luiz Augusto von Dentz
2012-03-27  6:31         ` Mikel Astiz
2012-03-27 14:22           ` Mike
2012-07-05  6:58             ` AW: " Mikel Astiz

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=CAB7rCTgJrxKZurWVq7ixt7NGJ6D6d-urtYe3UDKR+9bxQdgdEQ@mail.gmail.com \
    --to=puffy.taco@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.