Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1472667pxb; Wed, 20 Oct 2021 05:57:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzkva6hmVgnruvUZdS83HJ9VfU/T1M0/t8YV3JL2LeOhnbqTCiulBLQNzEsQ82VZXuCIXt X-Received: by 2002:a17:90a:353:: with SMTP id 19mr7192600pjf.83.1634734631607; Wed, 20 Oct 2021 05:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634734631; cv=none; d=google.com; s=arc-20160816; b=UPGl4cmPuKqsBkyJIh+p5aU9XBWB5N7+x0hvNemIG1qNONhwT3b6WDnXVLSCBf++UB 9tCI7qrL911A/KHyGbYfsjv6N4N+UZIfOUuK48qzR3N9rs9lN05HPspNAI07FPQofaLn /8YvXKIloCr6biZaZOt0nBrpcdNZirZJRei78Hwg03LygYnZSi2QDek3kgopOgpQfy0b X0n7yp1DWnnBM917ank/xAY86L3P59ssyzUwAiZ8e6CRluuRpxnJR35Mr9WxP7Er+QOx QzXew4odoyLht/YYjB+erb7NCBCGe1LSzbIIstpKbwf53fmVR8C4wsgjg4a27dC1QdcX 0ccA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=9sJLjzxAtHazEaZnHjxEPrx9KtA4H0xTdx3kIBYI/G8=; b=X9+44qrUdJbg9Sy7XKCq3s4W3k+c7qhceRs2f0UppJi9mJYRykcixZFih9aTAf2Yfc mreqErEu222n0HQF59FDnzUVFnhFSe9kYDYFaN5czgzsQmdjs9FWfyNhi/i48R61qhDO ZukrudwciMWzEp2j4JEwalWCJCw8V+cGfZLuAnIUvnDnkUPk1YfilhIJQjwvC2skJYul kBJF+PGc1qSnuA4NwDB20c5KN87q57mmiwnfzY+mAcBY/a74kuE9RsksfFUF0qj5m4eh SowrlTCjVwNNDZ9C+qtzP+QzX7C+2fitsA0AzZKuoyPabmmQDcipgVcVwMmsAEtn7TwR CcJg== 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 u20si3840986pfk.226.2021.10.20.05.56.39; Wed, 20 Oct 2021 05:57:11 -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 S230183AbhJTM5P convert rfc822-to-8bit (ORCPT + 99 others); Wed, 20 Oct 2021 08:57:15 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:47519 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhJTM5P (ORCPT ); Wed, 20 Oct 2021 08:57:15 -0400 Received: from smtpclient.apple (p54899aa7.dip0.t-ipconnect.de [84.137.154.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 7E51DCED1B; Wed, 20 Oct 2021 14:54:59 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [BlueZ PATCH v3 1/3] doc: Introduce the Adv Monitor Device Lost event From: Marcel Holtmann In-Reply-To: <20211013115927.BlueZ.v3.1.I7f6bdb9282c1e12ffc6c662674678f2b1cb69182@changeid> Date: Wed, 20 Oct 2021 14:54:58 +0200 Cc: Luiz Augusto von Dentz , CrosBT Upstreaming , linux-bluetooth Content-Transfer-Encoding: 8BIT Message-Id: <95CDCED5-0B56-4CA1-9E7A-56082CB3A777@holtmann.org> References: <20211013190035.1876237-1-mmandlik@google.com> <20211013115927.BlueZ.v3.1.I7f6bdb9282c1e12ffc6c662674678f2b1cb69182@changeid> To: Manish Mandlik X-Mailer: Apple Mail (2.3654.120.0.1.13) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Manish, > Add a new event 'Adv Monitor Device Lost' to indicate that the > controller has stopped tracking a particular device. > > --- > > Changes in v3: > - Discard changes to the Device Found event and notify bluetoothd only > when the controller stops monitoring the device via new Device Lost > event. > > Changes in v2: > - Instead of creating a new 'Device Tracking' event, add a flag 'Device > Tracked' in the existing 'Device Found' event and add a new 'Device > Lost' event to indicate that the controller has stopped tracking that > device. > > doc/mgmt-api.txt | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > index 5355fedb0..712bb362d 100644 > --- a/doc/mgmt-api.txt > +++ b/doc/mgmt-api.txt > @@ -107,7 +107,8 @@ Configuration command, Default Runtime Configuration Changed event, Get > Device Flags command, Set Device Flags command, Device Flags Changed event, > Read Advertisement Monitor Features command, Add Advertisement Patterns > Monitor command, Remove Advertisement Monitor command, Advertisement Monitor > -Added event and Advertisement Monitor Removed event. > +Added event, Advertisement Monitor Removed event and Advertisement Monitor > +Device Lost event. > > > Example > @@ -4910,3 +4911,26 @@ Controller Resume Event > Address_Type. Otherwise, Address and Address_Type will both be zero. > > This event will be sent to all management sockets. I would consider adding a Advertising Monitor Device Found Event that is similar to the Device Found event, but also includes the Monitor_Handle. It just makes this whole thing a bit more symmetric. > + > + > +Advertisement Monitor Device Lost Event > +======================================= > + > + Event code: 0x002f > + Controller Index: > + Event Parameters: Monitor_Handle (2 Octets) > + Address (6 Octets) > + Address_Type (1 Octet) > + > + This event indicates that the controller has stopped tracking the > + device that was being tracked by monitor with handle Monitor_Handle. > + > + The address of the device being tracked will be shared in Address and > + Address_Type. > + > + Possible values for the Address_Type parameter: > + 0 BR/EDR > + 1 LE Public > + 2 LE Random > + > + This event will be sent to all management sockets. And as noted by Luiz, make 0 Reserved since we only do this for LE at the moment. Regards Marcel