linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@codecoup.pl>
To: Howard Chung <howardchung@google.com>
Cc: linux-bluetooth@vger.kernel.org, luiz.von.dentz@intel.com,
	chromeos-bluetooth-upstreaming@chromium.org
Subject: Re: [Bluez PATCH v2 3/6] doc: Add documentation for LE Set Advertising Interval
Date: Mon, 30 Mar 2020 11:25:19 +0200	[thread overview]
Message-ID: <528530767.EP9f1MIPRH@ix> (raw)
In-Reply-To: <20200330160343.Bluez.v2.3.Ia74c1ab0a71d90f46f10b4e32743cab722a97bbb@changeid>

Hi,

On Monday, 30 March 2020 10:03:54 CEST Howard Chung wrote:
> Signed-off-by: Howard Chung <howardchung@google.com>
> ---
> 
> Changes in v2: None
> 
>  doc/advertising-api.txt | 13 +++++++++++++
>  doc/mgmt-api.txt        | 25 +++++++++++++++++++++++++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/doc/advertising-api.txt b/doc/advertising-api.txt
> index b0565eab2..9264cdb27 100644
> --- a/doc/advertising-api.txt
> +++ b/doc/advertising-api.txt
> @@ -209,3 +209,16 @@ Properties	byte ActiveInstances
>  			Possible values: "1M"
>  					 "2M"
>  					 "Coded"
> +
> +		void SetAdvertisingIntervals(uint16 min_interval_ms,
> +					     uint16 max_interval_ms)
> +
> +			This method sets the advertising intervals.
> +
> +			The parameters min_interval_ms and 
max_interval_ms
> +			are specified in milli-seconds. Valid values of
> +			the intervals must fall between 20 ms and 10,240 
ms.
> +
> +			Possible errors: org.bluez.Error.Failed
> +					 org.bluez.Error.InProgress
> +					 
org.bluez.Error.InvalidArguments
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index 27a41f334..5eff87e24 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -2925,6 +2925,31 @@ Read Extended Controller Information Command
>  				Invalid Index
> 
> 
> +Set Advertising Intervals Command
> +=================================
> +
> +	Command Code:		0x0101
> +	Controller Index:	<controller id>
> +	Command Parameters:	Min_Interval     (2 Octets)
> +				Max_Interval     (2 Octets)
> +	Return Parameters:	Current_Settings (4 Octets)
> +
> +	This command is used to set advertising intervals. The intervals
> +	are expressed in multiples of 0.625 ms. The default values of
> +	both intervals are 0x0800. Valid Min_Interval and Max_Interval
> +	values must fall between 0x0020 and 0x4000.
> +
> +	The advertising intervals are first kept in hdev struct. The values
> +	would be sent to the controller and take effect when advertising is
> +	actually enabled. If the advertising intervals are set when
> +	advertising is already on, the advertising would be disabled and
> +	re-enabled to make the intervals take effect.
> +
> +	Possible errors:	Busy
> +				Rejected
> +				Invalid Parameters
> +
> +
>  Set Appearance Command
>  ======================


I feel this should be per instance settings, and if we want this level of 
finetuning we would probably need to have new command for adding advertising 
sets (where we could fix more, eg not limit data to 255 bytes).

Other option would be to maybe have new flags in current Add Advertising that 
would allow to choose from low,med,hi (eg based on GAP recommended values) 
intervals, and then allow to finetune those via extra command or sysfs?

Just my two cents.

-- 
pozdrawiam
Szymon Janc



  reply	other threads:[~2020-03-30  9:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  8:03 [Bluez PATCH v2 0/6] Add support of setting advertiing intervals Howard Chung
2020-03-30  8:03 ` [Bluez PATCH v2 1/6] lib/mgmt: Add LE Set Advertising Interval definition Howard Chung
2020-03-30  8:03 ` [Bluez PATCH v2 2/6] core/advertising: Add support for LE set adverting interval Howard Chung
2020-03-30  8:03 ` [Bluez PATCH v2 3/6] doc: Add documentation for LE Set Advertising Interval Howard Chung
2020-03-30  9:25   ` Szymon Janc [this message]
2020-04-07 23:17     ` Luiz Augusto von Dentz
2020-03-30  8:03 ` [Bluez PATCH v2 4/6] monitor: Add support for decoding " Howard Chung
2020-03-30  8:03 ` [Bluez PATCH v2 5/6] test: Add test for " Howard Chung
2020-03-30  8:03 ` [Bluez PATCH v2 6/6] tools/btmgmt: Add setting string " Howard Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528530767.EP9f1MIPRH@ix \
    --to=szymon.janc@codecoup.pl \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=howardchung@google.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.von.dentz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).