linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Batyiev <batyiev@gmail.com>
To: linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Temporary device removal during discovery
Date: Wed, 8 Jul 2020 13:24:32 +0300	[thread overview]
Message-ID: <CAEQQxWxKs7ewwVyq4mnsyLbRhErQe9vZc5joNK6zfGSO3wN5bg@mail.gmail.com> (raw)

Hello everyone,

I've found the following issue:
1. in bluetoothctl run "power on", "scan on"
2. discovery is now permanent
3. make one device discoverable for a moment (e.g. turn bluetooth on
on your phone)
4. bluez would detect new device
5. turn bluetooth off on your phone
6. now wait

Expected result:
7. your phone should disappear from discovered set after some time

Actual result:
7. phone would stay there until discovery is off (i.e. "scan off" in
bluetoothctl)


It seems like there is a code in src/adapter.c responsible for purge
stale entries
(remove_temp_devices), however it only triggers when discovery is off
(and after 3 mins).


My use case is to continuously monitor the bluetooth environment. Is
it bluez responsibility to
remove stale entries during discovery or should my own app repeatedly
stop discovery?

Thanks,
   Andrey

             reply	other threads:[~2020-07-08 10:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 10:24 Andrey Batyiev [this message]
2020-07-08 11:29 ` Temporary device removal during discovery 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
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=CAEQQxWxKs7ewwVyq4mnsyLbRhErQe9vZc5joNK6zfGSO3wN5bg@mail.gmail.com \
    --to=batyiev@gmail.com \
    --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).