Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp336127pxb; Thu, 17 Feb 2022 05:19:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZGa22/lXCESZAaDPzgmGUhDLCbivX88MYKVGVsCxVEwOu6/rvIxN35kp9mBh9YP/tbqtQ X-Received: by 2002:a63:fc0e:0:b0:365:39dd:2cd0 with SMTP id j14-20020a63fc0e000000b0036539dd2cd0mr2448046pgi.173.1645103979470; Thu, 17 Feb 2022 05:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645103979; cv=none; d=google.com; s=arc-20160816; b=Mcgx9AejQ0pqDC2Xxw7cssPiyrjlJeqDrWAeXBRZv+piQbeszfc7t6nsB9KBAxqY9A 2VZTjv64obRJFD9/A7JNe4PRYPe2N0bd56Q9+1qRwHJnH0aUqJ+9GrUKNF6CcRYwb+yR oHchq3cWNZQb0GStAuUqmR4bKQiU2xeNFPtEkQ+M7V2+We+ogYP6MjjBA9fq+gQ7kDkR Qu7x2UkZFY5rBp/p9z7msFZeAvmoPJ2Ypa7BZEVs8A9a3kd0dQan4GP5sOp1UDgzYSbQ o1W14Pg6lsBlre2M81blvEuUADOquMeNNHO8ju+Ako/Xek3blnZjnL8VdMbYNeM0zsSu BD/Q== 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=1TS9Gt7T3IGncTkKW1ALle8l09Z/SVva/Oj/l9e1dA8=; b=GRAaszr87XzPgUg8ccWAiBgzuJ8Z64wMpDlLCO0ndqkW40/+Oc2LnFobVEXT2Sv1nv 84U8/HZ5zGru7mB8jCu6C24e25b4s3j4Zo7A+xlhmcUPhzy0b/CshEjbSzyM74WvG1Xf ng3pnlKNJm01ukmvSJyMHMY/eyZ0a8lSsS/MD/C4D7eUob2g97BdWhdHWthC0MQ5daiu 97atLs/lu4tasGhs2Ry0nrJfrmtvRuOdVrcSAo0URywuMK9GtGeAtPyxRvDhcSVAXGgd 57bNhnXVMtqi/NsruhWf5WVdP+SDkU9W6WvixhBMSurm+dUDHqtybLe5S4x+/N6p6DBZ nwig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8si1125256pgc.619.2022.02.17.05.19.25; Thu, 17 Feb 2022 05:19:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238795AbiBQMNx convert rfc822-to-8bit (ORCPT + 99 others); Thu, 17 Feb 2022 07:13:53 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240253AbiBQMNw (ORCPT ); Thu, 17 Feb 2022 07:13:52 -0500 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9C4F9B18B3 for ; Thu, 17 Feb 2022 04:13:35 -0800 (PST) Received: from smtpclient.apple (p4fefcd07.dip0.t-ipconnect.de [79.239.205.7]) by mail.holtmann.org (Postfix) with ESMTPSA id 7C6A7CECDD; Thu, 17 Feb 2022 13:13:34 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Re: [BlueZ PATCH v4 1/8] doc: Introduce the quality report command and event From: Marcel Holtmann In-Reply-To: <20220215133636.2827039-1-josephsih@chromium.org> Date: Thu, 17 Feb 2022 13:13:33 +0100 Cc: BlueZ , Luiz Augusto von Dentz , pali@kernel.org, josephsih@google.com, chromeos-bluetooth-upstreaming@chromium.org Content-Transfer-Encoding: 8BIT Message-Id: <666C5B97-A51C-48B9-AC91-0655C0D158B5@holtmann.org> References: <20220215133636.2827039-1-josephsih@chromium.org> To: Joseph Hwang X-Mailer: Apple Mail (2.3693.60.0.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Joseph, > Add the MGMT quality report command and event in doc/mgmt-api.txt. > > Signed-off-by: Joseph Hwang > --- > > Changes in v4: > - Use "Quality Report Event" without the prefix "Bluetooth" word. > - Combine both MGMT quality report command and event changes in a > single patch. > > Changes in v3: > - Swap AOSP Bluetooth Quality Report Event and Intel Telemetry Event. > - Add 5 new patches (5/9 - 9/9) to enable the quality report > feature via MGMT_OP_SET_QUALITY_REPORT instead of through the > experimental features. > > Changes in v2: > - This is a new patch for adding the event in doc/mgmt-api.txt > > doc/mgmt-api.txt | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 61 insertions(+) > > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > index ebe56afa4..a494f5d7e 100644 > --- a/doc/mgmt-api.txt > +++ b/doc/mgmt-api.txt > @@ -332,6 +332,7 @@ Read Controller Information Command > 15 Static Address > 16 PHY Configuration > 17 Wideband Speech > + 18 Quality Report > > This command generates a Command Complete event on success or > a Command Status event on failure. > @@ -2924,6 +2925,7 @@ Read Extended Controller Information Command > 15 Static Address > 16 PHY Configuration > 17 Wideband Speech > + 18 Quality Report > > The EIR_Data field contains information about class of device, > local name and other values. Not all of them might be present. For > @@ -3858,6 +3860,46 @@ Add Advertisement Patterns Monitor With RSSI Threshold Command > Invalid Parameters > > > +Set Quality Report Command > +========================== > + > + Command Code: 0x0057 > + Controller Index: > + Command Parameters: Action (1 Octet) I remember mentioning that we should use Quality_Report instead of Action. > + Return Parameters: Current_Settings (4 Octets) > + > + This command is used to enable and disable the controller's quality > + report feature. The allowed values for the Action command parameter > + are 0x00 and 0x01. All other values will return Invalid Parameters. > + > + The value 0x00 disables the Quality Report, and the value 0x01 > + enables the Quality Report feature. > + > + This command is only available for the controllers that support > + either AOSP Bluetooth quality report or Intel telemetry event. The details below are interesting, but don’t have to be in this document. It is supported if the Supported_Settings indicate support for it. > + For a controller supporting the AOSP specification, it should call > + hci_set_aosp_capable() in its driver. The controller should also > + return version_supported v0.98 or higher in its Vendor-specific > + capabilities responding to the LE_Get_Vendor_Capabilities_Command. > + On the other hand, for a controller supporting Intel specification, > + it should set up the set_quality_report callback properly. The driver > + is responsible of setting up the quality report capability as > + described above; otherwise, a Not Supported status will be returned. > + > + This command requires to use a valid controller index. Otherwise, > + an Invalid Index status will be returned. > + > + The command is sent to the controller to enable/disable the quality > + report feature, and generates a Command Complete event on success. > + If the controller failed to execute the action, a Failed status will > + be returned. Can this be used when powered off, is it remembered over power off/on cycles etc. > + > + Possible errors: Failed > + Invalid Index > + Invalid Parameters > + Not Supported > + > + > Command Complete Event > ====================== > > @@ -4978,3 +5020,22 @@ Advertisement Monitor Device Lost Event > 2 LE Random > > This event will be sent to all management sockets. > + > + > +Quality Report Event > +==================== > + > + Event code: 0x0031 > + Controller Index: > + Event Parameters: Quality_Spec (1 Octet) > + Report_Len (2 Octets) > + Report (0-65535 Octets) > + > + This event carries the Bluetooth quality report sent by the > + controller. > + > + Possible values for the Quality_Spec parameter: > + 0 AOSP Bluetooth Quality Report Event > + 1 Intel Telemetry Event > + > + This event will be sent to all management sockets. Regards Marcel