Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp428011ybt; Wed, 8 Jul 2020 03:25:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ4n7LBetc5cJEftftPi7NUC3jrCX1cFY4PQfXRcoUxogRJnngf5JDdR7vqXJVwRz9DxVg X-Received: by 2002:a17:906:b813:: with SMTP id dv19mr50194027ejb.119.1594203927821; Wed, 08 Jul 2020 03:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594203927; cv=none; d=google.com; s=arc-20160816; b=l4KFVfQ8VbaQwB08La0ulg0ifoW0DHFfzHHTxKF1pOjIJ/ve5Lv7UwR/BM0mYr7aFC KmKtbsh6+BojvQs/rbDHtMwT4oEphcqHSp8EFfwdGeWYjXsx15kngWTTV09sQdXJB38T E8k/s5y/Anu2H/v2NyQ5rpbuKDO+kMxKk4f7cLEqVPoYKU56lDgtomPOuogZ0NHmhlNM VLpAtayex192q/21qgF+sutdKLzhJA89QsDwp0IOaMbqOKeG+w9abS6mi+WxIpnF0IQL 331YElMylXjIDIO9eAuC0oEk9FTGOcWI3f6JqW29V3AkZtIPs8iXL+ebYJj+1+ZAK3x4 ueVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :mime-version:dkim-signature; bh=hjVFcpSUOWmjOUhAjbp9t713LG+CPl0W9t3Mxd3PJhw=; b=ZHrKema3nW79HM9xPdsh1GQ8BKgnIGGd0ZAVUMzOZgTyUmNfQmP5KtvkHsrdUeYq/c WlQ6hY5ntcEjjQK7Us5Y+S8IK65V0oxXfKd8HSShq51GRsbA0X1gpFcIkEdgDK3/bVEW 2uJ+hvFuOuJUx7SNiRQVwkUkeySfm2govnUDE842u5R1jIMvLTKqFOjxo7Lgpvdwuw03 oIbhjScKEdazlnvyhOIJKNSDQnsd9d+rBzdHRsc4SlTMK66PUbvIBexKH0lT0/Rb++8A BRz6gG1UiX9uHCspu0LZR9chiGtGVfUg0c1Yxp1UU1toP6owjgAzkz79FbQycB66OcaN PKXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lqgiA+9P; 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 d19si16277107edz.443.2020.07.08.03.24.46; Wed, 08 Jul 2020 03:25:27 -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=lqgiA+9P; 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 S1726586AbgGHKYp (ORCPT + 99 others); Wed, 8 Jul 2020 06:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728176AbgGHKYo (ORCPT ); Wed, 8 Jul 2020 06:24:44 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E74C08C5DC for ; Wed, 8 Jul 2020 03:24:44 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id k5so990482pjg.3 for ; Wed, 08 Jul 2020 03:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=hjVFcpSUOWmjOUhAjbp9t713LG+CPl0W9t3Mxd3PJhw=; b=lqgiA+9P0w4AkyRmLchQwJ5uJibOVFuKS4wdleLwl1h38Ia3QsPrmYX8EmCZ7+OOOO xGOhTDAaKAzpLX+BwdrCwgGsAETCaoEQTmly+xmdjsA2zOLKMKZrM+4hB+4J02Egk+HU kxEkji//WwfQlrZlkTJffIfZZqT/VeG5lFh9xd/SurtZWXd7m1f+4CYPSPOdgXKwVzyW 8AaYsGN0EgyNIO5EBEyNQfsPBYZpHPR/gfKrU8vwx7mi6HsGIZmKPgc1wwxyQShWoW7V RQmJls3WE7+ncKLIcWnxMGTnrAuay8GRlpzhG+rxEE2d0uD1Ja5SviLqUj4QyA91vEAJ EYqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hjVFcpSUOWmjOUhAjbp9t713LG+CPl0W9t3Mxd3PJhw=; b=dadONMtFVJ7vBvqTPasmfzncU8CgGKGdiXcIC7JWMcG/hlpdR3C0h1flsjFWr2enTA Nbigx9B5TdQ/NSmTCu8OJOT/EHLi2bXji118vqx+eogPQqSr2ga279hvpaThqDf3Is5e EMYPycjrCIBXk3wxRaRgZ4Acqm++dXTsrukAXNoY2hGQB64hOJkNRhn9+TZI3389v3XC raWQlXgXYjohlNmB+b5U1o7EtCrPiuxDFa0AgRONh1gTDZ+d7xW/jeZq1MvWQP9DlY+w fh+eUusRSJvQk4LkUpT8OjdsD549E6McyKSOK906MalypiiAzwK/m/KTre5RGwZYOb2L /frw== X-Gm-Message-State: AOAM531Xp0V7/O9jGQ2CP7thRHsKjNsJ38boa6HXWMc503lIvYfa7uKB ZQb6zE8AtBVCm93PUt8Q8+XyTUH+Cze+/eulP8RduQC6 X-Received: by 2002:a17:90b:3683:: with SMTP id mj3mr8831412pjb.91.1594203883469; Wed, 08 Jul 2020 03:24:43 -0700 (PDT) MIME-Version: 1.0 From: Andrey Batyiev Date: Wed, 8 Jul 2020 13:24:32 +0300 Message-ID: Subject: Temporary device removal during discovery To: 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 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