Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp182087ybh; Tue, 21 Jul 2020 20:21:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfTyUNGrYE2lDn3JTYZ0u+xUUEmMoim1+mXFm/TFp2pGgU3EhsRKCNZlCVlTJRBEB64jLb X-Received: by 2002:a50:ee01:: with SMTP id g1mr27868298eds.264.1595388107332; Tue, 21 Jul 2020 20:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595388107; cv=none; d=google.com; s=arc-20160816; b=l5ghy8iE11yrdhTHwpJLp1zPRFDAJ2nwMZgGhCSFkb/o+lzm1D2zfMsN/pyRVZxO3B 9lINxdRbCG5QegkxdrYSH3yQdV68r+DluensiB2jRnOywIBG6Xmohz7hnS8kOLVP3Igv bVAFVMQplwl3WDjfm21RBltK/2TaTmN1aaqL+ZCcgDaDE97e6W4zhr77fZpESxquyJVx ic4m2bGF+6a7BhWKs1IFXXQ6S1UfPeJM45A4stkvLzlLh/obXcXtLb1Ci/EcdZTEpeZf bWcrODEIneqGN6ZyMTzYCPs4jP3ibE2c+HseUSAw2ETRI2nlM+jJRbYmZdNAQcipP0Hz rJVg== 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=msnUWH+TlT3OvBHqrc8dcTnpYvjDPCiZd6MOKcGt6yo=; b=XqNZOMtR5b7n3CXK5ALBGxFqP1hJAA073gCyZ0LCEJpAo5RO6zmxOpwSZpGVGqFhIN y5UV/vCRHF4jrFk17Cr5lXGZue3/3JGRH5r8C4GFD3pniWU3WOuRfjWZGqa1YqQoBjdc qTgt5hcZ/v3WwwJ2W/riw4KGPqMwKeGK5xGz3C3R/MfUwxlGt6ue5zhYwJID4J2Byhid AQ9IoGQpw0FrJMvmha6SYMSf/yW5gJadgQ88mdcHs1swtGnIIsxZeu5KClAcFStCrSo4 +fkQygO7/dCyFeLsRgH+hSX4Y3oknc/WuaV9JNnTIZ0uW3I6lcytsmJisa7+8mHDwQiL yXyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="fhLZ/Ya/"; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si13631968edn.30.2020.07.21.20.21.20; Tue, 21 Jul 2020 20:21:47 -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=@chromium.org header.s=google header.b="fhLZ/Ya/"; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731793AbgGVDTD (ORCPT + 99 others); Tue, 21 Jul 2020 23:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731621AbgGVDTD (ORCPT ); Tue, 21 Jul 2020 23:19:03 -0400 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDF36C061794 for ; Tue, 21 Jul 2020 20:19:02 -0700 (PDT) Received: by mail-vs1-xe43.google.com with SMTP id k7so398752vso.2 for ; Tue, 21 Jul 2020 20:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=msnUWH+TlT3OvBHqrc8dcTnpYvjDPCiZd6MOKcGt6yo=; b=fhLZ/Ya/fXEsadc4ZkOXfRtFfbH45MVSgVTu4fDNgzstBzSQPgo1YCiCINjEGIM5z8 HCHiXzfBnDzNR79ddpJTDmqO/SxZVHdVUtGxIvFRIb5J0Zwo5IMd+0+GF87MX5+ueRjy kMAlcep8sMJkzaGILuwtv4bNFh1Ow83dwTVyg= 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=msnUWH+TlT3OvBHqrc8dcTnpYvjDPCiZd6MOKcGt6yo=; b=P4vSAN6dOXs3ogTmd3BcZtT/HCSYG24MEIndnQGzLE9S2u9KyZm78FYn8hYsF+zSwM GLuFvBfXT4G9hFRO6Du/Qq1s567oR3N3P1XiYDPz+6LYhMDBAdGifHubXImTBjZrm1qw uusXNHQzNXwM427ORg9rxrC7gurHJRqJveABI5aXt5KFj0NgqafFwBUjMcYPGTcitBzS T/YM13E5SFvhtzizi2iLymthV9KpxEww0/ESHz6uCHBO8ZvYkYmSV5PssTi/mB5oZCDg XwXi/TpCBce4SoS4IB1qAEbyq2GWm2At0Vlw8RUC1ewD0Mrnbfv2R9o9axSLpCOWFm8c wvhA== X-Gm-Message-State: AOAM530xWicId4WmfQb/4CfItr+RtoOc4E+Tuh0XNc4ecZ+2w9i3wWNr /KHk0f7FHIiY2rsYtAoxzcgFo5/P2EITbZ6jr0l99Q== X-Received: by 2002:a67:fd0b:: with SMTP id f11mr21027225vsr.93.1595387942008; Tue, 21 Jul 2020 20:19:02 -0700 (PDT) MIME-Version: 1.0 References: <20200714125120.Bluez.v2.1.I9181af521cf0fba8f4315c9b89975848d437d6dd@changeid> In-Reply-To: <20200714125120.Bluez.v2.1.I9181af521cf0fba8f4315c9b89975848d437d6dd@changeid> From: Abhishek Pandit-Subedi Date: Tue, 21 Jul 2020 20:18:50 -0700 Message-ID: Subject: Re: [Bluez PATCH v2] doc: Add Suspend and Resume events To: Marcel Holtmann , Luiz Augusto von Dentz Cc: ChromeOS Bluetooth Upstreaming , Bluez mailing list , Alain Michaud , Miao-chen Chou 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 Marcel, Please take a look at this v2 patch. Thanks Abhishek On Tue, Jul 14, 2020 at 12:51 PM Abhishek Pandit-Subedi wrote: > > Add Controller Suspend Event and Controller Resume Event to identify > suspend or resume of the Bluetooth stack has occurred. > > Also update Device Disconnected Event to indicate a new disconnect > reason: "Connection terminated by local host for suspend" > > Reviewed-by: Alain Michaud > Reviewed-by: Miao-chen Chou > --- > > Changes in v2: > - Moved Wake_Reason to first value > - Reduced Wake_Reason to not Bluetooth, unexpected event and remote wake > > doc/mgmt-api.txt | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 48 insertions(+) > > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > index ca0d38469..e7a713824 100644 > --- a/doc/mgmt-api.txt > +++ b/doc/mgmt-api.txt > @@ -3834,6 +3834,7 @@ Device Disconnected Event > 2 Connection terminated by local host > 3 Connection terminated by remote host > 4 Connection terminated due to authentication failure > + 5 Connection terminated by local host for suspend > > Note that the local/remote distinction just determines which side > terminated the low-level connection, regardless of the > @@ -4577,3 +4578,50 @@ Advertisement Monitor Removed Event > > The event will only be sent to management sockets other than the > one through which the command was sent. > + > + > +Controller Suspend Event > +======================== > + > + Event code: 0x002d > + Controller Index: > + Event Parameters: Suspend_State (1 octet) > + > + This event indicates that the controller is suspended for host suspend. > + > + Possible values for the Suspend_State parameter: > + 0 Running (not disconnected) > + 1 Disconnected and not scanning > + 2 Page scanning and/or passive scanning. > + > + The value 0 is used for the running state and may be sent if the > + controller could not be configured to suspend properly. > + > + This event will be sent to all management sockets. > + > + > +Controller Resume Event > +======================= > + > + Event code: 0x002e > + Controller Index: > + Event Parameters: Wake_Reason (1 octet) > + Address (6 octets) > + Address_Type (1 octet) > + > + This event indicates that the controller has resumed from suspend. > + > + Possible values for the Wake_Reason parameter: > + 0 Resume from non-Bluetooth wake source > + 1 Wake due to unexpected event > + 2 Remote wake due to peer device connection > + > + Currently, we expect that only peer reconnections should wake us from > + the suspended state. Any other events that occurred while the system > + should have been suspended results in wake due to unexpected event. > + > + If the Wake_Reason is Remote wake due to connection, the address of the > + peer device that caused the event will be shared in Address and > + Address_Type. Otherwise, Address and Address_Type will both be zero. > + > + This event will be sent to all management sockets. > -- > 2.27.0.389.gc38d7665816-goog >