Re: [Bluez PATCH v2 3/6] doc: Add documentation for LE Set Advertising Interval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Monday, 30 March 2020 10:03:54 CEST Howard Chung wrote:
> Signed-off-by: Howard Chung <howardchung@xxxxxxxxxx>
> ---
> 
> 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





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux