Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp983476ybt; Wed, 8 Jul 2020 17:16:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyty4ff5BbLvWBUXOqyx7gtFTWCe8ShiFa9S1V72jTzmwWefZExUZeqhX2JfKH8P2Nv75gx X-Received: by 2002:a17:906:26d6:: with SMTP id u22mr19826904ejc.271.1594253804324; Wed, 08 Jul 2020 17:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594253804; cv=none; d=google.com; s=arc-20160816; b=G9Ctzls3sfw2nT5MHpPHsB8xR1XKKpnei/1WVM465kTGnhlGwya/J5H2ZTdCXR/5yv Jcs1ee49cmxxJyDp49e+qGMgEylPq3kDt46+Ce4pi0QHRx78rUp5Zk3dqjoz+YDj2wGp VpF0GNsjgIwqya+thzeeVmWtKVAaj+szxT7Fq+D+7LStuDFD/vvxN2ofPziyFhPuO6uq 00+dxB3+B/+XKf7tUszs8f2LTUNVDLzA3zfQcsjalVHSSaSYEjj3g6za5cDmDuvi7XqP J355kqQWx1FxXRRRMEWuH1WLpdwD67esaN9bm0uIDKRrOGMvjCF0V7zuzf3Nh9AaigpU fQAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DAy6fpR5/xZbQxxlH57PWAcHB2SkdiT0qmgOwdkwU3M=; b=WHNP4cYRrLt2hi07fJplBjr5NXOA5zhO0EbmGAH2ldB+Rx2hJDuQ+wpXDuuxyl6QKJ D3uYH3ZNIB3n67Q0SKxThS+Uhh8I/OQcYhkZ27CFecc6d4H+upputkpxfjTHcPGEunJx Ry4faz0vsDIWePjOpLDufD+FoYgm6aog1COZuVeiCyEfQZCFVj/iyt56si1T2X5PObxq ICOtSJk5t6XBmVD4VLL8UB0vWim1O132Or7fvkMhlmply+2T4NwPCm9+/orZh+1jXAxq O5deIMHlXbjTDhiP0kpnj8bnZR5xmSRfWcVKD7LcXO6MhqWVQxSUrQjIyhaBRD7Kjs7k siaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vo0AD9F2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w6si915316edx.62.2020.07.08.17.16.02; Wed, 08 Jul 2020 17:16:44 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vo0AD9F2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbgGIAOD (ORCPT + 99 others); Wed, 8 Jul 2020 20:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgGIAOD (ORCPT ); Wed, 8 Jul 2020 20:14:03 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D15BAC061A0B for ; Wed, 8 Jul 2020 17:14:02 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id l63so435361oih.13 for ; Wed, 08 Jul 2020 17:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DAy6fpR5/xZbQxxlH57PWAcHB2SkdiT0qmgOwdkwU3M=; b=Vo0AD9F2JCLgzg51iFjf4CjdrlnaKjCfb72swb5t8LB83DSXRI2OQfip1ztqiVOtWp h+pCVqeuc8ogG0Bp72fU+bZfCUhMFUAmu0mYbjKlsX03oLT/Y2xxfu2dmclgE3cqoNqd XCagqhQYHGo02BryRIysoVGGab2af3B/m0R+5f8VpUd1HwKL5AFUFQSYKbLsl09NbBle RSXBpGHpAEWu/O5e5mbet9WxRxdhFBV0S/g9fyqOPna04xAlJk3HTD7EQCrBvqTiuJff sUwaBWHI5PMExnWQISzgs/lyJ++3z9mhcz2j4GPNqWb3EW4ASpHy+0n6WUhtRbtu4mt7 RlJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DAy6fpR5/xZbQxxlH57PWAcHB2SkdiT0qmgOwdkwU3M=; b=FWsz6WwVow9r8ZoTuabfen0yVsa0Y9dw0IqJPiuugjnKvDvpEkRTFrNUB99KgO18Ps 6z4W3Yp9/PLJu1DkaXRLwrYn3b9H6nhwZ/sN5P5J49RkdwG1cX4bxbuAerCj5JRirwha GNeEQ5SlmultyZry9bTtC+UOdHyMFSe/bpUDvvDdfWFTwJ2WqU3jNzQip34x0fNC+tX8 eiRMuQYqnZibQlqrcYICg9rOJHwHrWAmvgIeCLjJsEYzoXvsVXD7o6buYYIpPTs6MmaE rbBN4GTK18zNst0gAJmbTKCu9Elfh6Re4IIi/0lIww2vMCOogREu0UUvcdfGWoeSlsPb YWEQ== X-Gm-Message-State: AOAM531wh9iqg9G2qfCsuUwOxfIYMoqnqKjLEausnMp8+AvZvsQ6A97X a7Y/SdsU8JGs2GH9xvmAi24LS9ryTRGXi1VcRuE= X-Received: by 2002:aca:2819:: with SMTP id 25mr8632910oix.48.1594253642055; Wed, 08 Jul 2020 17:14:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Wed, 8 Jul 2020 17:13:49 -0700 Message-ID: Subject: Re: Temporary device removal during discovery To: Andrey Batyiev Cc: Bastien Nocera , linux-bluetooth Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Andrey, On Wed, Jul 8, 2020 at 3:57 PM 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) That is exactly what I mean with detecting devices disappearing, so I'm fine to introduce such logic and use the temporary timeout so it can be removed while an existing discovery is in place. -- Luiz Augusto von Dentz