All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: mike mike <majormail999@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Disabling passive scanning for LE connections
Date: Fri, 20 May 2016 09:14:04 +0200	[thread overview]
Message-ID: <B79CAA63-93A0-4BD6-88A8-1287B377296D@holtmann.org> (raw)
In-Reply-To: <CAE1tnCy4qcTmwxj_rnpxC3yFFgU2bOPA94WJeuvatNjWU-wu8A@mail.gmail.com>

Hi Mike,

>> All LE connections are now triggered through a preceding passive scan
>> and waiting for a connectable advertising report. This means we've got
>> the best possible guarantee that the device is within range and should
>> be able to request the controller to perform continuous scanning. This
>> way we minimize the risk that we miss out on any advertising packets.
> 
> My code manages 100's of BLE devices with long advertising periods.
> I need to connect to devices (sometime multiples devices at the same
> time) as quickly as possible.  My current implementation usually catches
> and connects to the first advertising event (average connect time is < 7
> seconds)
> 
> I have my own code using the HCI interface for doing this.  This code
> has worked well for a while, but since the passive LE scanning was
> added as part of the kernel connection processes (kernel 4.4.4?) I
> have a problems with the process:
> 
> - occasionally conflicting with my access to the whitelist
> - occasionally deleting all entries in my whitelist.
> 
> Is it possible to disable passive scanning, or will I need a kludge to
> catch and work around these events?

use HCI User Channel to gain exclusive HCI access. Otherwise the kernel owns the HCI control and not you. You would be injecting commands from user space with no guarantee that the kernel will overwrite it.

Regards

Marcel


  reply	other threads:[~2016-05-20  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 22:06 Disabling passive scanning for LE connections mike mike
2016-05-20  7:14 ` Marcel Holtmann [this message]
2016-05-23 17:49   ` mike mike
2016-05-24  7:43     ` Marcel Holtmann

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=B79CAA63-93A0-4BD6-88A8-1287B377296D@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=majormail999@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.