Hey Andrey, On Wed, 2020-07-08 at 13:24 +0300, Andrey Batyiev wrote: > 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? It's been a problem for a while. I sent one of those mails as well: https://www.spinics.net/lists/linux-bluetooth/msg75947.html https://www.spinics.net/lists/linux-bluetooth/msg74397.html Can you please file a bug at https://github.com/bluez/bluez/issues ? I'll CC: myself on it too. Cheers