From: Johan Hedberg <johan.hedberg@gmail.com>
To: "João Paulo Rechi Vita" <jprvita@openbossa.org>,
linux-bluetooth@vger.kernel.org,
"Claudio Takahasi" <claudio.takahasi@openbossa.org>
Subject: Re: [PATCH BlueZ] mgmt: Add LE scanning callback
Date: Tue, 14 Aug 2012 13:30:43 +0300 [thread overview]
Message-ID: <20120814103043.GB8175@x220> (raw)
In-Reply-To: <20120814093605.GA5352@x220>
Hi,
On Tue, Aug 14, 2012, Johan Hedberg wrote:
> On Fri, Aug 03, 2012, João Paulo Rechi Vita wrote:
> > From: Claudio Takahasi <claudio.takahasi@openbossa.org>
> >
> > This patch adds a new callback to allow the adapter to control LE
> > scanning. The current approach uses the active scanning with default
> > windows and intervals defined by the core spec without any filtering.
> > ---
> > src/mgmt.c | 32 ++++++++++++++++++++++++++++++++
> > src/mgmt.h | 1 +
> > 2 files changed, 33 insertions(+)
> >
> > diff --git a/src/mgmt.c b/src/mgmt.c
> > index 8ae86d3..5ceeaa8 100644
> > --- a/src/mgmt.c
> > +++ b/src/mgmt.c
> > @@ -1999,6 +1999,38 @@ int mgmt_start_discovery(int index)
> > return 0;
> > }
> >
> > +int mgmt_start_scanning(int index)
> > +{
> > + char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_start_discovery)];
> > + struct mgmt_hdr *hdr = (void *) buf;
> > + struct mgmt_cp_start_discovery *cp = (void *) &buf[sizeof(*hdr)];
> > + struct controller_info *info = &controllers[index];
> > +
> > + DBG("index %d", index);
> > +
> > + info->discov_type = 0;
> > +
> > + if (mgmt_low_energy(info->current_settings)) {
> > + hci_set_bit(BDADDR_LE_PUBLIC, &info->discov_type);
> > + hci_set_bit(BDADDR_LE_RANDOM, &info->discov_type);
> > + }
>
> Shouldn't you just return an error here (e.g. -ENOTSUP) if LE is not
> supported/enabled?
>
> Have there been any patches sent that would use this API? At least I
> didn't see any after a quick scan of the mailing list.
I see that these users are part of the original thread sent on Jul 27th.
I got confused since you renamed the subjects in a way that there was no
other indication to the original thread except the References: header.
The point about returning an error still remains though.
Johan
next prev parent reply other threads:[~2012-08-14 10:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 22:29 [PATCH BlueZ 00/14] LE General Connection Establishment procedure João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 01/14] core: Control connections based on adapter state João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 02/14] mgmt: print error message when start_discovery fails João Paulo Rechi Vita
2012-07-30 10:57 ` Anderson Lizardo
2012-08-03 14:42 ` [PATCH BlueZ] " João Paulo Rechi Vita
2012-08-14 9:40 ` Johan Hedberg
2012-08-14 10:28 ` Johan Hedberg
2012-08-14 17:53 ` Joao Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 03/14] core: add compare function for bdaddr in a struct btd_device João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 04/14] core: Add a list of LE devices to connect João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 05/14] core: use adapter connect list for LE connections João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 06/14] core: mutually exclude concurrent connections João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 07/14] mgmt: Add LE scanning callback João Paulo Rechi Vita
2012-07-30 11:46 ` Anderson Lizardo
2012-08-03 16:18 ` [PATCH BlueZ] " João Paulo Rechi Vita
2012-08-14 9:36 ` Johan Hedberg
2012-08-14 10:30 ` Johan Hedberg [this message]
2012-08-14 17:59 ` Joao Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 08/14] core: Replace interleaved by LE scanning João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 09/14] core: Start LE scanning when a device requests João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 10/14] core: Remove leftover define João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 11/14] core: Queue discovery if scanning is active João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 12/14] test: Fix exiting the bus when a discovery session ends João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 13/14] core: Disable unnecessary auto connections João Paulo Rechi Vita
2012-07-27 22:29 ` [PATCH BlueZ 14/14] core: Re-connect for ECONNRESET or ECONNABORTED João Paulo Rechi Vita
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=20120814103043.GB8175@x220 \
--to=johan.hedberg@gmail.com \
--cc=claudio.takahasi@openbossa.org \
--cc=jprvita@openbossa.org \
--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;
as well as URLs for NNTP newsgroup(s).