From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Mikel Astiz <mikel.astiz@bmw-carit.de>
Subject: [RFC BlueZ v0 0/5] ACL disconnect reason
Date: Mon, 14 May 2012 17:32:59 +0200 [thread overview]
Message-ID: <1337009584-17181-1-git-send-email-mikel.astiz.oss@gmail.com> (raw)
From: Mikel Astiz <mikel.astiz@bmw-carit.de>
Some use-cases require distinguishing the reason behind an ACL disconnection. Particularly, IVI use-cases regarding HFP and A2DP need to know if a disconnection was due to a timeout, in order to know which should be the reconnection strategy.
This information needs to be exposed to some component implementing the specific policy of each application. Typically neither BlueZ or oFono (in case of HFP) would be the case. This means the disconnect reason needs to be exposed in D-Bus.
In this patch series the proposed approach is to add a signal in the device API, given that we already have some low-level disconnection-related API there. Another approach would be to support it in the specific HFP and A2DP interfaces.
In addition, the kernel doesn't provide this information when using the management interface. Either the management interface is extended (the corresponding patch will be sent soon) or this field needs to be reported through a RFCOMM socket option after a POLLHUP disconnect event. This second approach would require to handle it separatedly in userspace for HFP and A2DP (and potentially for other profiles), and besides, assuming BlueZ is responsible for exposing the field in D-Bus, it would be necessary to hold a copy of the RFCOMM socket.
Mikel Astiz (5):
doc: Add D-Bus signal to provide disconnect reason
Use defines instead of magic numbers
Propagate disconnect reason to adapter
Propagate disconnect reason to device
Send D-Bus signal to propagate disconnect reason
doc/device-api.txt | 14 ++++++++++++++
lib/mgmt.h | 5 +++++
plugins/hciops.c | 2 +-
plugins/mgmtops.c | 10 ++++++++--
src/adapter.c | 7 ++++---
src/adapter.h | 2 +-
src/device.c | 51 +++++++++++++++++++++++++++++----------------------
src/device.h | 3 ++-
src/event.c | 4 ++--
src/event.h | 3 ++-
10 files changed, 68 insertions(+), 33 deletions(-)
--
1.7.7.6
next reply other threads:[~2012-05-14 15:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 15:32 Mikel Astiz [this message]
2012-05-14 15:33 ` [RFC BlueZ v0 1/5] doc: Add D-Bus signal to provide disconnect reason 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
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=1337009584-17181-1-git-send-email-mikel.astiz.oss@gmail.com \
--to=mikel.astiz.oss@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=mikel.astiz@bmw-carit.de \
/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).