From: Marcel Holtmann <marcel@holtmann.org>
To: Claudio Takahasi <claudio.takahasi@openbossa.org>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
"Ganir, Chen" <chen.ganir@ti.com>,
Anderson Lizardo <anderson.lizardo@openbossa.org>,
"anderson.briglia@openbossa.org" <anderson.briglia@openbossa.org>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
Bruna Moreira <bruna.moreira@openbossa.org>
Subject: Re: [RFC 7/7] Update Management API documentation
Date: Thu, 16 Jun 2011 07:47:48 -0700 [thread overview]
Message-ID: <1308235671.2196.21.camel@aeonflux> (raw)
In-Reply-To: <BANLkTimKcE09f8qniUwbtDHtU2_BajDwwg@mail.gmail.com>
Hi Claudio,
> >>> if TX power is only read once than the kernel should just do it once
> >>> and
> >>> be done with it.
> >>>
> >>> And for RSSI, it would be better if the kernel read this periodically
> >>> based on current sniff mode etc. Userspace can not trigger this with
> >>> proper timing anyway. And it will potentially at some point start
> >>> blocking the controller. Only the kernel really knows when it is
> >>> acceptable to read the RSSI value.
> >>
> >> Reading the RSSI by the kernel, will force a certain limitation on the
> >> current and future Profiles. I believe setting the timing should be done
> >> by the profile itself, not the bluez user space code or the kernel. It
> >> is the responsibility of the profile to periodically poll the RSSI Level.
> >> For some cases, polling it every 5 seconds would be ok, and for some
> >> Others, it may be better to read it every second. I believe we must not
> >> impose any limitation here.
> >
> > You probably forgot that besides bluetoothd there should be no other
> > application holding the mgmt socket, so not you can't really do it in
> > poll in the application side and doing it over D-Bus is overkill. Also
> > I notice that from some parties, you include, there is some tendency
> > to have the profiles split from the bluetoothd, IMO this will only add
> > fragmentation with each and every platform using BlueZ having their
> > own implementation of each profile and not sharing much, making the
> > IOP a complete mess.
> >
>
> Some additional comments...
>
> Health plugin will need a similar approach to read the clock. It will
> be good to implement the same approach.
> In our suggested implementation the adapter controls when to send the
> command to read the RSSI, keeping the same logic for both: hciops and
> mgmtops. If the adapter is managing when to send the commands,
> repeated commands can be avoided, multiple callbacks can be registered
> by the profiles, but only one command to read the RSSI will be sent.
> The cover letter of the userspace patches contains more details how we
> implemented it.
>
> Reading the RSSI directly by the kernel will break hciops. These are
> the arguments that I have to support our decision.
what I am hearing is that we want the kernel to poll for certain
information if userspace needs them. And either it is a one-shot poll or
it is on a regular interval.
The management interface will be primarily used by bluetoothd, but it is
open for other users as well. Mainly some low-level system tools or more
important qualification tools.
So triggering certain actions from userspace is always tricky and then
we need to have bluetoothd sync with itself, its plugins etc. So I
rather prefer that we tell the kernel which pollable information to read
at which interval and then just get a notification if they have changed.
Let the kernel do its job without having to wakeup half of userspace to
make a simple decision to poll a value.
And don't get me wrong, the stupid Bluetooth chip should be able to poll
this value with an interval natively. The best we can do is emulate that
in the kernel.
Regards
Marcel
next prev parent reply other threads:[~2011-06-16 14:47 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1308171784-24442-1-git-send-email-y>
2011-06-15 21:02 ` [RFC 1/7] Add current tx power read on hciops anderson.briglia
2011-06-15 21:02 ` [RFC 2/7] Add read RSSI " anderson.briglia
2011-06-15 21:03 ` [RFC 3/7] Add RSSI read callbacks anderson.briglia
2011-06-15 21:03 ` [RFC 4/7] Add transmission power callbacks anderson.briglia
2011-06-15 21:03 ` [RFC 5/7] Implement mgmt_read_rssi command anderson.briglia
2011-06-15 21:03 ` [RFC 6/7] Implement mgmt_read_tx_power command anderson.briglia
2011-06-15 21:03 ` [RFC 7/7] Update Management API documentation anderson.briglia
2011-06-15 22:10 ` Marcel Holtmann
2011-06-15 23:47 ` Anderson Lizardo
2011-06-16 2:29 ` Marcel Holtmann
2011-06-16 6:07 ` Ganir, Chen
2011-06-16 7:54 ` Luiz Augusto von Dentz
2011-06-16 12:35 ` Claudio Takahasi
2011-06-16 14:47 ` Marcel Holtmann [this message]
2011-06-16 15:12 ` Claudio Takahasi
2011-06-16 16:08 ` Marcel Holtmann
2011-06-16 20:45 ` Gustavo F. Padovan
2011-06-20 15:47 ` Anderson Briglia
2011-06-20 16:47 ` Marcel Holtmann
2011-06-16 13:49 ` Anderson Lizardo
2011-06-16 14:08 ` Johan Hedberg
2011-06-16 14:17 ` Anderson Lizardo
2011-06-16 7:15 ` GATT and GATT based Profiles architecture - Query Ajay Pillai
2011-06-16 14:04 ` Anderson Lizardo
2011-06-17 9:30 ` Ajay Pillai
2011-06-17 12:10 ` Anderson Lizardo
2011-06-17 12:22 ` Santiago Carot
2011-06-17 12:39 ` Anderson Lizardo
2011-06-17 12:53 ` Santiago Carot
2011-06-20 8:42 ` Ajay Pillai
2011-06-16 6:03 ` [RFC 7/7] Update Management API documentation Ganir, Chen
2011-06-16 13:44 ` Anderson Lizardo
2011-06-16 14:19 ` Ganir, Chen
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=1308235671.2196.21.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=anderson.briglia@openbossa.org \
--cc=anderson.lizardo@openbossa.org \
--cc=bruna.moreira@openbossa.org \
--cc=chen.ganir@ti.com \
--cc=claudio.takahasi@openbossa.org \
--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 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).