Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1772695ybk; Thu, 21 May 2020 15:06:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN4UKkpyofHgifSbXluyzHCO4X/MwTDeItXtpiFNDQlrh1mdHNk2egWSq0M3DXycS2vlCk X-Received: by 2002:a05:6402:357:: with SMTP id r23mr730866edw.230.1590098805772; Thu, 21 May 2020 15:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590098805; cv=none; d=google.com; s=arc-20160816; b=zTU8kgswZdPnshQwMPYE6EBE06TjYcpLCvqLyibYOPSq9TP3zA5k6pzP5BtRdtmVnL 0jWrl/uTAl/4phy80yjjpeqzJjGBue+l9B1Qd9OcNKu8ILXfxOWxUVv9r79Xmx0Ghnct kW4xx+g/wEh9VahINcKnZYYEADmiAPVNaIsf/7dUfI3ohwqBZE39F1v1h3UgzMEMhueX qw3o7pVJ48Rcz42xUrBbIthdu/RC5/C2PsQ47+mLPNF5EaL8NFus+QUrTyMbDupDD3E7 v0lN+PpMNaJOEhwHOc8cjFtvYN+m1tVQIxmV2WkM9Pe3qoUDCT+cS5ZoCEadofE4YQx5 NXTg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=jHoFVJHXPbghNXTep9Kc9zeR5QzsIsW3PO4Zc9F+hjQ=; b=i9tKneeBv4yL6jmgQEZyM/kJSoG8zf0Mt3ruMDVaKt0T+KNfVlgO73rFZKyYzaAHcw 3idvlDpuJ+rFI4ZctQQd9dTAZ/M9bP5Wrxye/wOf1chn8Ro1ofPMAimZn2jGsfsGq9kc MTAUBGB5K8ZuNP+FyxZv68ZPDO9kpG1tx0iy8hgc2DB+l+1HKJAXbZrAFdWqBf9Gma4q D9dLRWMD8gJqOVgvlEs0Vbow4cAYwXWTeRkqmkbAJIjNjgaEf6nNLpBy+UnT7508Dt/p TVOyrYAMNLFbApq1qhRzfIHaFHT92+BQO15PjNa3ldHSY5gXJbwzhvovzTsskUrskLPG airw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o+QbQQSS; 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 n14si4024899ejy.690.2020.05.21.15.05.59; Thu, 21 May 2020 15:06:45 -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=o+QbQQSS; 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 S1728701AbgEUWFx (ORCPT + 99 others); Thu, 21 May 2020 18:05:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728327AbgEUWFx (ORCPT ); Thu, 21 May 2020 18:05:53 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAFA7C061A0E for ; Thu, 21 May 2020 15:05:52 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id s198so7595370oie.6 for ; Thu, 21 May 2020 15:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=jHoFVJHXPbghNXTep9Kc9zeR5QzsIsW3PO4Zc9F+hjQ=; b=o+QbQQSSiLjl+dLHBtBHKcFmgKVaFqjvX76q+5WaS1BQseLS/9f7ZmNmBZZncn8Bo5 EE3ylgPtCdGuoOjlNimsA/f8rKTdpSfzyZU+x8jx1pASJWtcBwUWrpeDESyjX/lmayqy F9v5W9omIrW8rP3ji6fIwVilZahHX6s2izRdy3zo5wTf714fpKBOQ2nhJojxQCe4tnD7 BMdE4ouWgdcw4JuGcMphe11Y57SB++yK+nyug4e1nalouOP5lZZMa0j7ZiKKnclunh1j H7bbrtPG+9fYFVR/dkjwtkdlqzuOFHD0fVEuoML8oBVx+3XR7iu889v7DmkostFV+dz7 PnPA== 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:content-transfer-encoding; bh=jHoFVJHXPbghNXTep9Kc9zeR5QzsIsW3PO4Zc9F+hjQ=; b=jnESoZA+K5Gj9ALmYuIwL0TDUWZ5Qh24dB2n75cDf0BtBj6KjC0yLaDClHsn2EP1DE XwPxlRNtzC7PCWn/pRNuTuX5QhALp811a+pugs2+zpO97N4V7oRPaDbfxewhcepkbPzp VowPwOy+CCvc9zKuLnG269B2rDn2BiyMgEr0xPpjNyiZcnR35/t70/L1lIFIfvpZRxYR scaPYeNA/Tk5MeFfixHyUnCJMsNfbV4sKr6qkSIItbuatydXxFw0wWOXcSKTDMAtw9lY GT7V4FkrRgu6ZqV/YwcUQ5fnNHY/iuBG4MKsisAc15bHjxbe4hkFZ0CUHpmOGOLRiy6/ rCxA== X-Gm-Message-State: AOAM531Kmit8W3qw5m2cUVwudN4ipGTAGX1pP7W8OYSdQg6oKBf5S6Z7 VfNi/qfeJ3ntfqbfSiW306mwQylp9551ePZRW5Q= X-Received: by 2002:aca:6747:: with SMTP id b7mr567088oiy.110.1590098751962; Thu, 21 May 2020 15:05:51 -0700 (PDT) MIME-Version: 1.0 References: <20200521145757.245774-1-alainm@chromium.org> In-Reply-To: From: Luiz Augusto von Dentz Date: Thu, 21 May 2020 15:05:38 -0700 Message-ID: Subject: Re: [BlueZ PATCH v3] doc:adding definitions for load default params mgmt op To: Alain Michaud Cc: Alain Michaud , "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Alain, On Thu, May 21, 2020 at 1:12 PM Alain Michaud wro= te: > > Hi Luiz, > > > On Thu, May 21, 2020 at 12:26 PM Luiz Augusto von Dentz wrote: >> >> Hi Alain, >> >> On Thu, May 21, 2020 at 8:05 AM Alain Michaud wrot= e: >> > >> > This change adds the definition for the load default parameter command= . >> > In particular, this command is used to load default parameters for >> > various operations in the kernel. This mechanism is also expandable to >> > future values that may be necessary. >> > >> > This will allow bluetoothd to load parameters from a conf file that ma= y >> > be customized for the specific requirements of each platforms. >> > >> > --- >> > rebase against current master >> > >> > doc/mgmt-api.txt | 62 +++++++++++++++++++++++++++++++++++++++++++++++= + >> > 1 file changed, 62 insertions(+) >> > >> > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt >> > index 6ee01fed8..c6575e654 100644 >> > --- a/doc/mgmt-api.txt >> > +++ b/doc/mgmt-api.txt >> > @@ -3223,6 +3223,68 @@ Set Experimental Feature Command >> > Invalid Index >> > >> > >> > +Load Default Controller Parameter Command >> > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D >> > + >> > + Command Code: 0x004b >> > + Controller Index: >> > + Command Parameters: Parameter_Count (2 Octets) >> > + Parameter1 { >> > + Parameter_Type (2 Octet) >> > + Value_Length (1 Octet) >> > + Value (0-255 Octets) >> > + } >> > + Parameter2 { } >> > + ... >> > + Return Parameters: >> > + >> > + This command is used to feed the kernel a list of default cont= roller >> > + parameters. >> > + >> > + Currently defined Parameter_Type values are: >> > + >> > + 0x0000 BR/EDR Page Scan Type >> > + 0x0001 BR/EDR Page Scan Interval >> > + 0x0002 BR/EDR Page Scan Window >> > + 0x0003 BR/EDR Inquiry Scan Type >> > + 0x0004 BR/EDR Inquiry Scan Interval >> > + 0x0005 BR/EDR Inquiry Scan Window >> > + 0x0006 BR/EDR Link Supervision Timeout >> > + 0x0007 BR/EDR Page Timeout >> > + 0x0008 BR/EDR Min Sniff Interval >> > + 0x0009 BR/EDR Max Sniff Interval >> > + 0x000a LE Advertisement Min Interval >> > + 0x000b LE Advertisement Max Interval >> > + 0x000c LE Multi Advertisement Rotation Interval >> > + 0x000d LE Scanning Interval for auto connect >> > + 0x000e LE Scanning Window for auto connect >> > + 0x000f LE Scanning Interval for HID only >> > + 0x0010 LE Scanning Window for HID only >> >> I remember commenting that we don't have profile information on the >> kernel so Im not sure how you are planning to detect the when the >> device is HID or not? > > I expect we'll need to add an Add Device flag to carry that information d= own into the kernel. The hid profile already sends an op, so it's relative= ly trivial to carry that information in so we can apply specific scanning r= equirements for that case (which are less aggressive and therefore have les= s of an impact to Wifi and BT performance). Well if we will need to feed that information of the profile type we might as well just feed the intervals directly, that way any profile that needs some different parameters than the default can all use the same command and we don't have to grow this list when a new profile want to use different parameters. >> >> >> > + 0x0012 LE Scanning Interval for wake scenarios >> > + 0x0013 LE Scanning Window for wake scenarios >> > + 0x0014 LE Scanning Interval for discovery >> > + 0x0015 LE Scanning Window for discovery >> > + 0x0016 LE Scanning Interval for adv monitoring >> > + 0x0017 LE Scanning Window for adv monitoring >> > + 0x0018 LE Scanning Interval for connect >> > + 0x0019 LE Scanning Window for connect >> > + 0x001a LE Min Connection Interval >> > + 0x001b LE Max Connection Interval >> > + 0x001c LE Connection Connection Latency >> > + 0x001d LE Connection Supervision Timeout >> > + >> > + This command can be used when the controller is not powered an= d >> > + all settings will be programmed once powered. Note that these= only >> > + control the default parameters. Higher level Apis may influen= ce the >> > + effective value used. >> > + >> > + This command generates a Command Complete event on success or >> > + a Command Status event on failure. >> > + >> > + Possible errors: Invalid Parameters >> > + Invalid Index >> > + >> > + >> > Command Complete Event >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> > >> > -- >> > 2.26.2.761.g0e0b3e54be-goog >> > >> >> >> -- >> Luiz Augusto von Dentz --=20 Luiz Augusto von Dentz