linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: Andrey Batyiev <batyiev@gmail.com>,
	linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: Temporary device removal during discovery
Date: Fri, 10 Jul 2020 11:06:22 -0700	[thread overview]
Message-ID: <CABBYNZ+y9UTv1yakyB3Z+1oa+B4dw5TmSiuhCmWQCq88sXpXgw@mail.gmail.com> (raw)
In-Reply-To: <ddb9a0761e52a2e70e1c0dcc6fcefca02937dda6.camel@hadess.net>

Hi Bastien,

On Thu, Jul 9, 2020 at 1:26 AM Bastien Nocera <hadess@hadess.net> wrote:
>
> On Thu, 2020-07-09 at 01:57 +0300, Andrey Batyiev wrote:
> > Hi Luiz,
> >
> > On Thu, Jul 9, 2020 at 12:14 AM Luiz Augusto von Dentz
> > <luiz.dentz@gmail.com> wrote:
> > > The delta logic might be a nice addition as a separate patch, it is
> > > more for detecting devices disappearing then actually cleanup
> > > during
> > > power off.
> > No-no, it's not about adapter powering off.
> >
> > I meant that (external) devices never disappear from the bluez device
> > list during the discovery,
> > even if the (external) devices are turned off (i.e. they should be
> > purged by bluez).
> >
> > So:
> > - bluez is central
> > - bluez is discovering
> > - peripheral appear for a moment, than disappear (i.e. peripheral
> > would be turned off)
> > - bluez would not remove device from the list (at least until
> > discovery is stopped)
> >
> > Use case:
> > - bluez is monitoring environment (discovering literally forever)
> > - peripherals are brought in and out of bluez visibility range
> > - bluez list of visible devices grows infinitely and causes problems
> > (hundreds of devices)
>
> I'd also expect devices that are recently discovered to disappear if
> they haven't replied to a discovery in 30 seconds. It would stop
> GNOME's Bluetooth Settings's Bluetooth list forever expanding.
>
> Or we need to give the ability for front-ends to do that by exporting
> the "last seen" dates.

I am fine with that as well, 30 seconds doesn't sound too bad even for
cleanup temporary devices as the current 3 minutes seems awful long
sometimes, we could perhaps have a filter for configuring that though
so if the application wants to have its own timeout, the only problem
is if there are multiple application doing that on parallel we would
need a strategy on how to handle that.

-- 
Luiz Augusto von Dentz

  reply	other threads:[~2020-07-10 18:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 10:24 Temporary device removal during discovery Andrey Batyiev
2020-07-08 11:29 ` Bastien Nocera
2020-07-08 15:53   ` Andrey Batyiev
2020-07-08 21:14     ` Luiz Augusto von Dentz
2020-07-08 21:19       ` Luiz Augusto von Dentz
2020-07-08 22:57       ` Andrey Batyiev
2020-07-09  0:13         ` Luiz Augusto von Dentz
2020-07-09  8:26         ` Bastien Nocera
2020-07-10 18:06           ` Luiz Augusto von Dentz [this message]
2020-07-10 19:00             ` Bastien Nocera
2020-07-10 20:27               ` Luiz Augusto von Dentz

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=CABBYNZ+y9UTv1yakyB3Z+1oa+B4dw5TmSiuhCmWQCq88sXpXgw@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=batyiev@gmail.com \
    --cc=hadess@hadess.net \
    --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).