Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1218982ybt; Thu, 9 Jul 2020 01:27:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVsaP7aOfeKRrtzcGcFicjVKxot+fL5B0CDTCjP66iIA2yPUDHEsEowAkVbc5y+ziMban5 X-Received: by 2002:a17:906:46d1:: with SMTP id k17mr54846013ejs.446.1594283230724; Thu, 09 Jul 2020 01:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594283230; cv=none; d=google.com; s=arc-20160816; b=mRItPRIoorXApSp4lCZ+eOTUbFHDxdJlJ6z9dFx0UDVCSCWE0M8QP5oeGpInm3dF/9 F6PFA9N8RkbuNdfV1epCiCfxy6yg2ASB5joBAh+dgjVWB3V+h6DYEC9agDCeUeJ50XxT g9OBPGoMdSFWmsBpTqPaHJSDw6BZZn74aKVpkilDVkNy+VOPjp/9sUJ3XG0YCrDcaD2x 33cp4fTGimpflcnOx/w+zW4bFXCD1qcHgVUCa8Dlfpv2GFGwVzxNwQyuOqNHO70QCTow SGODEyd3jsAOv+1ZQmp8P3yQDn6x5qd4DSbbEcgHDDTgm+RHb/OyttgDNWpSxN+DVUa7 w0KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=txUiBlA0hX/1AnCBVR9A3Q8Xbk7xzD6gU5wwImsbk0E=; b=jHXAKxGlRF/+QsUdavF3eLQQkmeBBLomRdqxsNFUFJJ1klOgYnjBN60/Tp0SgwImwI bqAfnZmFqQ2OStRdlpIqImYvpUsi4X3QbxSnH9JEVZtDanmCuRaFlLX5/rnOcJmrHqLi PwSWmnKX8KBe1/oT73iyhhQhll9/3Ey7idzIHk3k6iNPWtxtrETltr1AGcnjZc7SqLOP nwUECkhR1+rx5c/FgJIvuc2b2TKyr23RVudw1QKtPyaVqnzdR/toWU1LFVWFHeyc02kb mJ/QM1sDwvE4mAtSLGV74yaJJOGdFKjATZ0mUzYCu1YehQg2h49enMQwjfDl1M2NJazC IZlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh2si1369430edb.55.2020.07.09.01.26.29; Thu, 09 Jul 2020 01:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbgGII0J (ORCPT + 99 others); Thu, 9 Jul 2020 04:26:09 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:41779 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgGII0J (ORCPT ); Thu, 9 Jul 2020 04:26:09 -0400 Received: from classic (lns-bzn-39-82-255-60-242.adsl.proxad.net [82.255.60.242]) (Authenticated sender: hadess@hadess.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id E4FFB24000E; Thu, 9 Jul 2020 08:26:06 +0000 (UTC) Message-ID: Subject: Re: Temporary device removal during discovery From: Bastien Nocera To: Andrey Batyiev , Luiz Augusto von Dentz Cc: linux-bluetooth Date: Thu, 09 Jul 2020 10:26:06 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3 (3.36.3-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 > 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. Cheers