linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike <puffy.taco@gmail.com>
To: Mikel Astiz <mikel.astiz.oss@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [RFC BlueZ v0 0/5] ACL disconnect reason
Date: Wed, 16 May 2012 09:28:08 -0500	[thread overview]
Message-ID: <CAB7rCTitrvDEsOGy_RAXS4=2D0YUBmLhQAyejvPVacc_sTXHpA@mail.gmail.com> (raw)
In-Reply-To: <CANT-zCV57v6yPy=eLg8g9LfC8igZt5Pete3t=OUsJ31z8m0kXw@mail.gmail.com>

Hi Luiz, Mikel,

On Wed, May 16, 2012 at 2:12 AM, Mikel Astiz <mikel.astiz.oss@gmail.com> wrote:
> Hi Luiz,
>
>>> From my point of view, the exact policy of which devices, how many of
>>> them, using which priorities, which profiles, etc. is manufacturer and
>>> model-specific. I don't think these policies should be embedded in
>>> BlueZ. After all, we already have a nice D-Bus API to handle these
>>> use-cases, and only the disconnect reason seems to be missing.
>>
>> Disconnect reason doesn't solve all the problems, specially in multi
>> profile case when just one profile has disconnected but the link is
>> still active. Besides that I would be very interested to know why each
>> model has to have a different behavior this goes completely in
>> opposite of having a common stack with a well defined behavior.
>
> The ACL disconnect case might not cover all use-cases, but it does
> cover the most important one: the link loss. Exposing if a specific
> profile has disconnected cleanly is IMO way too much.

You must know if the profile disconnected cleanly.  The spec is very
clear that a user must initiate re-connection in the event of a clean
disconnect (via any means, rebooting a device, clicking a button,
etc).  Somewhere there must be state stored that knows if the profile
was previously connected and if it needs to reconnect it.

>> When you say you want this specific per model all I can think of is
>> how much IOP problems it can cause and in the end I see no benefit for
>> the user, we should aim for re-connect as quick as possible and that
>> should be enough for any model.
>
> Let's not make a big deal out of this. We are talking about small
> differences in policies, such as how many devices and profiles are
> connected, and according to which priorities.
>
> I do agree that anything that could cause IOP problems should be
> handled inside BlueZ. And the immediate reconnection try after a link
> loss does sound an example of this kind. So I would be fine if BlueZ
> internally handles this, but I still think we need to expose this in
> D-Bus somehow.

The reason this is per model is that there is no spec on this and
hence it will be very implementation specific.  If you are a desktop
hooked up to AC, you really don't care, but an embedded device will
need to implement something that meets its battery constraints.  As
well, the efforts of bluez will be fruitless if the rest of the system
goes into suspend.  In my case, my device goes to suspend as soon as
possible (and wakes if there is BT UART traffic).  Hence, timers that
implement re-connection need to let the system know when the next
attempt will occur.

> One alternative to my original proposal -adding a Disconnected(uint8
> reason) signal- would be to use the state property of each interface
> (HFP, A2DP). If the autoreconnect policy is enabled, a link loss would
> generate the transition "connected"->"connecting" (or
> "playing"->"connecting"). Never setting the state to "disconnected"
> would effectively be equivalent as reporting a link loss.

That could appear awkward during the interval between connection attempts.

Mike

> Any thoughts on this second approach? Any other proposal?

  reply	other threads:[~2012-05-16 14:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 15:32 [RFC BlueZ v0 0/5] ACL disconnect reason Mikel Astiz
2012-05-14 15:33 ` [RFC BlueZ v0 1/5] doc: Add D-Bus signal to provide " Mikel Astiz
2012-05-14 15:33 ` [RFC BlueZ v0 2/5] Use defines instead of magic numbers Mikel Astiz
2012-07-18 11:49   ` Mikel Astiz
2012-07-18 12:23     ` Johan Hedberg
2012-05-14 15:33 ` [RFC BlueZ v0 3/5] Propagate disconnect reason to adapter Mikel Astiz
2012-05-14 15:33 ` [RFC BlueZ v0 4/5] Propagate disconnect reason to device Mikel Astiz
2012-05-14 15:33 ` [RFC BlueZ v0 5/5] Send D-Bus signal to propagate disconnect reason Mikel Astiz
2012-05-14 17:00 ` [RFC BlueZ v0 0/5] ACL " Luiz Augusto von Dentz
2012-05-15  6:46   ` Mikel Astiz
2012-05-15  8:10     ` Luiz Augusto von Dentz
2012-05-15  8:45       ` Mikel Astiz
2012-05-15  9:58         ` Luiz Augusto von Dentz
2012-05-16  7:12           ` Mikel Astiz
2012-05-16 14:28             ` Mike [this message]
2012-05-17 13:41               ` Luiz Augusto von Dentz
2012-05-17 14:00                 ` Mike

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='CAB7rCTitrvDEsOGy_RAXS4=2D0YUBmLhQAyejvPVacc_sTXHpA@mail.gmail.com' \
    --to=puffy.taco@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mikel.astiz.oss@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 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).