Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp16504ybt; Thu, 9 Jul 2020 14:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ6xpIQrTJigZ4zBNwUJjJG0AtThWLAPU268ThXp6xbMIgl5iYPg0VEAY1bcxTt7ijdNvf X-Received: by 2002:a17:906:8588:: with SMTP id v8mr60571894ejx.211.1594329118133; Thu, 09 Jul 2020 14:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594329118; cv=none; d=google.com; s=arc-20160816; b=hLQG0XZEyFxuBNmcCr638iVlLsEX0Y8wDixAYTBxfkKf+qNuQSGJlpzp3IkZYPKcBm ddBWTEMOHUli3d1Fb3gFYxRWzHCDOn0sQ97l3WE9TyjgkHSwlVRKbQJjDyVgmTqsUxPW qolWnpgO8kDE1btccyHqkOeZk/ojsVVM0gK8rFFakuV4f11VNDQpT4CLCfyzb58ZPVGx UKaCuBlEYYszEaokbxZ/fTA/CK0WAnQM/WSEw9crVbGbEQOXqyBxaNXC0nfxfZTHA29b avMn47v8QFoydBQikoU4Cz6XDFrp6co8RMVmjUE8j3kDWijcuWDsBWGs8ZVUHG8YlbfE QlHQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=nUdWCpDi1dn5PTCttl/9ZFOQYydznYHG0C95TtGGYgk=; b=Kp3FWsXRE/KrI47hkrCXbmIx0RnWthCLLfnQYcPQRnW9Wl0Y3Gw60kH9+0LDU+0Tnr WHPGDMHLh9DGxVcddLZ/x2DQPzVELN+krz1wnJ5dw/tWFd+eHjC1lrYGGU61oxcwVai4 /soOQZkn5tUUFG1L7s/fy1yjDMQM8hYzQPavSzKxWlgLrgkzlPvtzbj+WG9QrFjgrDib HEwMeox9tO5MJY3rZ6GBLfSYGs+ElMC9KHYLLJxKPEsClFg7civqx+W1gF3yw64VaO90 0TwoDWW2HIVIeOiWC9mKvbUlnfEQRHD4fNLfHqUSdGQJH6lc7AhozGOqRqQl5tASojLV 57FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eLLkvGVn; 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 p5si2936696edy.88.2020.07.09.14.11.12; Thu, 09 Jul 2020 14:11:58 -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=eLLkvGVn; 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 S1726222AbgGIVKX (ORCPT + 99 others); Thu, 9 Jul 2020 17:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbgGIVKX (ORCPT ); Thu, 9 Jul 2020 17:10:23 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31390C08C5CE for ; Thu, 9 Jul 2020 14:10:23 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id o1so1336885plk.1 for ; Thu, 09 Jul 2020 14:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nUdWCpDi1dn5PTCttl/9ZFOQYydznYHG0C95TtGGYgk=; b=eLLkvGVnTveO6Dj2TJ5JGP7eqEViAf6yw7Y1swsKuYJwNXJj8k37hhsoj9e4OiG0Wl +epC6eT+Q33epYdlD4qXdMdt0WqqyBHpqH18TODBJNiObnXXiIlVG/yAlJEOLMrjCGUL qS1T/LK5/y+IXvjVjOOhcPkcZR+0N0/sarYlM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nUdWCpDi1dn5PTCttl/9ZFOQYydznYHG0C95TtGGYgk=; b=iZ9F254dd16IU//cvVneGqV7j4AC3k7gRFK1G3M4pYKvWEmH53KYOCk78YEKF6TJsC g1WHtGjtfZKWBUJlYg3XLePvpBbMKh8PqUWMCLRSzywM9+t8prFpcfIsL3CkggnRk1s0 enmIWrAgK8Wfnu9oQ2MUTtvU4MIBLCzOMUxZW3GFgD9pThvEQJhH+qq8YV2kaba7Igdj 503SxDAAHFqWaGYAPRHoGqsZmr/RAZx0Gz71VKXZhhIjKYwtXhtCM6opdd2c6PTHpEJ6 oNgBolPlej+x94rPpmmkbAo//aaCcKq30GD/k9g7rgrfsnkvcdGgRtF0V4hYLIHkVVw7 pInw== X-Gm-Message-State: AOAM5335mdmaTUI2Xm0X69Mpi8fXYvfuN1F6J2c7peX3C6qYtBekrbGi WiWwFx/r1mo9ay41hmFBHrZfQw== X-Received: by 2002:a17:902:d715:: with SMTP id w21mr15828758ply.140.1594329022590; Thu, 09 Jul 2020 14:10:22 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:7220:84ff:fe09:2b94]) by smtp.gmail.com with ESMTPSA id l191sm3441374pfd.149.2020.07.09.14.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 14:10:22 -0700 (PDT) From: Abhishek Pandit-Subedi To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, linux-bluetooth@vger.kernel.org, Abhishek Pandit-Subedi , Alain Michaud , Miao-chen Chou Subject: [Bluez PATCH] doc: Add Suspend and Resume events Date: Thu, 9 Jul 2020 14:10:02 -0700 Message-Id: <20200709140928.Bluez.1.I9181af521cf0fba8f4315c9b89975848d437d6dd@changeid> X-Mailer: git-send-email 2.27.0.383.g050319c2ae-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 --- doc/mgmt-api.txt | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt index ca0d38469..f79c0222c 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,55 @@ 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: Address (6 octets) + Address_Type (1 octet) + Wake_Reason (1 octet) + + This event indicates that the controller has resumed from suspend. + + Possible values for the Wake_Reason parameter: + 0 Unexpected Event + 1 Resume from non-Bluetooth wake source + 2 Connection Request (BR/EDR) + 3 Connection Complete (BR/EDR) + 4 LE Advertisement + 5 LE Direct Advertisement + 6 LE Extended Advertisement + + We expect that only peer reconnections should wake us from the suspended + state. Any other events that cause a wakeup will be marked as Unexpected + Event. + + If the Wake_Reason was any of the expected wake reasons (values 2-6), + 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.383.g050319c2ae-goog