linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chevallier Maxime <maxime.chevallier@openwide.fr>
To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org,
	johan.hedberg@gmail.com
Subject: [RFC][PATCH] Add Set Advertising Parameters command
Date: Tue, 16 Feb 2016 14:09:27 +0100	[thread overview]
Message-ID: <20160216130927.GA10374@vps217108.ovh.net> (raw)

---
 doc/mgmt-api.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 731a088..4b842fd 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -2596,6 +2596,7 @@ Add Advertising Command
 		4	Add TX Power field to Adv_Data
 		5	Add Appearance field to Scan_Rsp
 		6	Add Local Name in Scan_Rsp
+		7	Pending Parameters
 
 	When the connectable flag is set, then the controller will use
 	undirected connectable advertising. The value of the connectable
@@ -2623,6 +2624,12 @@ Add Advertising Command
 	supported to provide less air traffic for devices implementing
 	broadcaster role.
 
+	If the Pending Parameters flag is set, the Advertising Instance
+	will only be queued when the Set Advertising Parameters command
+	is issued, with the correct Instance identifier. If the next
+	command is not a Set Advertising Parameters commmand, the current
+	Advertising Instance is cancelled.
+
 	The Duration parameter configures the length of an Instance. The
 	value is in seconds.
 
@@ -2680,6 +2687,66 @@ Add Advertising Command
 				Invalid Index
 
 
+Set Advertising Parameters Command
+==================================
+
+	Command Code:		0x003f
+	Controller Index:	<controller id>
+	Command Parameters:	Instance (1 Octet)
+				Adv_Interval_min (2 Octets)
+				Adv_Interval_max (2 Octets)
+	Return Parameters:
+
+	This command is used to set advertising parameters for a Bluetooth
+	Low Energy controller.
+
+	This command can be used to configure global advertising parameters
+	that will be applied for advertising issued by the Set Advertising
+	command.
+
+	This command can also be used to configure single Advertising
+	Instances. In that case, the parameters applied for the Advertising
+	Instance will override global Advertising Parameters when the
+	Adversiting Instance is running.
+
+	When configuring an Advertising Instance, the Instance must have
+	been added with the flag "Pending parameters". The Advertising
+	Instance will be added to queue only when the Set Advertising
+	Parameters will be issued.
+
+	The Instance parameter designates what we want to configure.
+	If the Instance parameter is 0, the Advertising Parameters apply
+	globally, for both the advertising issued with the Set Adverting
+	and the Advertising Instances issued with Add Avertsing.
+
+	If the Instance Parameter is not 0, it will apply on the given
+	Advertising Instance, if it exists.
+
+	In the case we are setting Advertising Parameters for an
+	Advertising Instance that is currently being advertised (if we
+	set global parameters, or if the Advertising Instance was not
+	added with the "Pending Parameters" flag), the parameters will be
+	applied at the next Instance or the next Set Advertising command.
+
+	In the case the controller is not advertising, the parameters will
+	be applied the next time we enable advertising.
+
+	A pre-requisite is that LE is already enabled, otherwise this
+	command will return a "rejected" response.
+
+	This command can be used when the controller is not powered and
+	all settings will be programmed once powered.
+
+	This command generates a Command Complete event on success or a
+	Command Status event on failure.
+
+	Possible errors:	Failed
+				Rejected
+				Not Supported
+				Invalid Parameters
+				Invalid Index
+
+
 Remove Advertising Command
 ==========================
 
-- 
2.1.4

             reply	other threads:[~2016-02-16 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 13:09 Chevallier Maxime [this message]
2016-02-16 18:11 ` [RFC][PATCH] Add Set Advertising Parameters command Marcel Holtmann
2016-02-16 18:35   ` Barry Byford
2016-02-16 18:42     ` Marcel Holtmann
2016-02-17  7:25   ` Maxime Chevallier

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=20160216130927.GA10374@vps217108.ovh.net \
    --to=maxime.chevallier@openwide.fr \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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).