2017-11-28 12:53:30

by Jaganath K

[permalink] [raw]
Subject: [PATCH 0/4 v3] LE New PHYs kernel interfaces

These patches enables user to get the supported phys by the
controller and set preferred phy to be used in subsequent
scanning and connection initiation.

Also added flags to support user selection for phy to be
advertised.

Jaganath Kanakkassery (4):
doc/mgmt-api: Add support for Get PHY Configuration command
doc/mgmt-api: Add support for Set Phy Configuration command
doc/mgmt-api: Add advertising phys support to flags
doc/mgmt-api: Update Duration Parameter description of Add Advertising

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

--
2.7.4



2017-11-29 05:32:00

by ERAMOTO Masaya

[permalink] [raw]
Subject: Re: [PATCH 3/4 v3] doc/mgmt-api: Add advertising phys support to flags

Hi Jaganath,

On 11/28/2017 09:53 PM, Jaganath Kanakkassery wrote:
> ---
> doc/mgmt-api.txt | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index 628ff18..e7453ea 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -2504,6 +2504,9 @@ Read Advertising Features Command
> 4 Add TX Power field to Adv_Data
> 5 Add Appearance field to Scan_Rsp
> 6 Add Local Name in Scan_Rsp
> + 8 Secondary Channel with LE 1M

7 is correct.


Regards,
Eramoto

> + 8 Secondary Channel with LE 2M
> + 9 Secondary Channel with LE Coded
>
> The Flags bit 0 indicates support for connectable advertising
> and for switching to connectable advertising independent of the
> @@ -2553,6 +2556,15 @@ Read Advertising Features Command
> space is limited a short version or no name information. The
> Local Name will be added at the end of the scan response data.
>
> + The Flags bit 7 indicates support for advertising in secondary
> + channel in LE 1M PHY.
> +
> + The Flags bit 8 indicates support for advertising in secondary
> + channel in LE 2M PHY. Primary channel would be on 1M.
> +
> + The Flags bit 9 indicates support for advertising in secondary
> + channel in LE CODED PHY.
> +
> The valid range for Instance identifiers is 1-254. The value 0
> is reserved for internal use and the value 255 is reserved for
> future extensions. However the Max_Instances value for indicating
> @@ -2613,6 +2625,9 @@ 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 Secondary Channel with LE 1M
> + 8 Secondary Channel with LE 2M
> + 9 Secondary Channel with LE Coded
>
> When the connectable flag is set, then the controller will use
> undirected connectable advertising. The value of the connectable
> @@ -2640,6 +2655,15 @@ Add Advertising Command
> supported to provide less air traffic for devices implementing
> broadcaster role.
>
> + Secondary channel flags can be used to advertise in secondary
> + channel with the corresponding PHYs. These flag bits are mutually
> + exclusive and setting multiple will result in Invalid Parameter
> + error. Choosing LE 1M and LE 2M will result in using extended
> + advertising with the primary channel being 1M and secondary channel
> + with the respective PHY. Choosing LE Coded will result in extended
> + advertising with both primary and secondary channel in LE Coded.
> + Choosing none of these flags will result in legacy advertising.
> +
> The Duration parameter configures the length of an Instance. The
> value is in seconds.
>
>


2017-11-28 12:53:32

by Jaganath K

[permalink] [raw]
Subject: [PATCH 2/4 v3] doc/mgmt-api: Add support for Set Phy Configuration command

This also adds PHY Configuration Changed Event.
---
doc/mgmt-api.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index c07c48c..628ff18 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -2940,9 +2940,46 @@ Get PHY Configuration Command
LE 1M TX and LE 1M RX would be supported by default.

This command is only available for LE capable controllers.
+ It will return Not Supported otherwise.
+
+ Possible errors: Not Supported
+ Invalid Index
+
+Set PHY Configuration Command
+=============================
+
+ Command Code: 0x0044
+ Controller Index: <controller id>
+ Command Parameters: Default_phys (2 Octet)
+ Return Parameters:
+
+ This command is used to set the default phy to the controller.
+
+ This will be stored and used for all the subsequent scanning
+ and connection initiation.
+
+ The list of supported PHYs can be retrieved via the
+ Get PHY Configuration command. Selecting unsupported PHYs will
+ result in an Invalid Parameters error.
+
+ This can be called at any point to change the preferred PHYs.
+
+ Default_phy is a bitmask with the following bits.
+ 0 LE 1M TX
+ 1 LE 1M RX
+ 2 LE 2M TX
+ 3 LE 2M RX
+ 4 LE CODED TX
+ 5 LE CODED RX
+
+ This command generates a Command Complete event on success
+ or a Command Status event on failure.
+
+ This command is only available for LE capable controllers.
It will return Not Supported otherwise.

Possible errors: Not Supported
+ Invalid Parameters
Invalid Index

Command Complete Event
@@ -3810,3 +3847,18 @@ Extended Controller Information Changed Event

The event will only be sent to management sockets other than the
one through which the change was triggered.
+
+PHY Configuration Changed Event
+===============================
+
+ Event Code: 0x0026
+ Controller Index: <controller id>
+ Event Parameters: Selected_phys (2 Octets)
+
+ This event indicates that default PHYs have been updated.
+
+ This event will only be used after Set PHY Configuration
+ command has been used at least once.
+
+ The event will only be sent to management sockets other than the
+ one through which the change was triggered.
--
2.7.4


2017-11-28 12:53:34

by Jaganath K

[permalink] [raw]
Subject: [PATCH 4/4] doc/mgmt-api: Update Duration Parameter description of Add Advertising

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

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index e7453ea..afc43da 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -2670,6 +2670,9 @@ Add Advertising Command
A value of 0 indicates a default value is chosen for the
Duration. The default is 2 seconds.

+ Duration parameter will be ignored if controller supports extended
+ advertising and instance scheduling will be done by the controller.
+
If only one advertising Instance has been added, then the Duration
value will be ignored. It only applies for the case where multiple
Instances are configured. In that case every Instance will be
--
2.7.4


2017-11-28 12:53:33

by Jaganath K

[permalink] [raw]
Subject: [PATCH 3/4 v3] doc/mgmt-api: Add advertising phys support to flags

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

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 628ff18..e7453ea 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -2504,6 +2504,9 @@ Read Advertising Features Command
4 Add TX Power field to Adv_Data
5 Add Appearance field to Scan_Rsp
6 Add Local Name in Scan_Rsp
+ 8 Secondary Channel with LE 1M
+ 8 Secondary Channel with LE 2M
+ 9 Secondary Channel with LE Coded

The Flags bit 0 indicates support for connectable advertising
and for switching to connectable advertising independent of the
@@ -2553,6 +2556,15 @@ Read Advertising Features Command
space is limited a short version or no name information. The
Local Name will be added at the end of the scan response data.

+ The Flags bit 7 indicates support for advertising in secondary
+ channel in LE 1M PHY.
+
+ The Flags bit 8 indicates support for advertising in secondary
+ channel in LE 2M PHY. Primary channel would be on 1M.
+
+ The Flags bit 9 indicates support for advertising in secondary
+ channel in LE CODED PHY.
+
The valid range for Instance identifiers is 1-254. The value 0
is reserved for internal use and the value 255 is reserved for
future extensions. However the Max_Instances value for indicating
@@ -2613,6 +2625,9 @@ 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 Secondary Channel with LE 1M
+ 8 Secondary Channel with LE 2M
+ 9 Secondary Channel with LE Coded

When the connectable flag is set, then the controller will use
undirected connectable advertising. The value of the connectable
@@ -2640,6 +2655,15 @@ Add Advertising Command
supported to provide less air traffic for devices implementing
broadcaster role.

+ Secondary channel flags can be used to advertise in secondary
+ channel with the corresponding PHYs. These flag bits are mutually
+ exclusive and setting multiple will result in Invalid Parameter
+ error. Choosing LE 1M and LE 2M will result in using extended
+ advertising with the primary channel being 1M and secondary channel
+ with the respective PHY. Choosing LE Coded will result in extended
+ advertising with both primary and secondary channel in LE Coded.
+ Choosing none of these flags will result in legacy advertising.
+
The Duration parameter configures the length of an Instance. The
value is in seconds.

--
2.7.4


2017-11-28 12:53:31

by Jaganath K

[permalink] [raw]
Subject: [PATCH 1/4 v3] doc/mgmt-api: Add support for Get PHY Configuration command

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

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 8e7de14..c07c48c 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -2871,6 +2871,7 @@ Read Extended Controller Information Command
13 Privacy
14 Controller Configuration
15 Static Address
+ 16 PHY configuration

The EIR_Data field contains information about class of device,
local name and other values. Not all of them might be present. For
@@ -2916,6 +2917,33 @@ Set Appearance Command
Invalid Parameters
Invalid Index

+Get PHY Configuration Command
+==========================
+
+ Command Code: 0x0043
+ Controller Index: <controller id>
+ Command Parameters:
+ Return Parameters: Supported_phys (2 Octet)
+ Selected_phys (2 Octet)
+
+ This command is used to retrieve the supported PHYs and currently
+ selected PHYs.
+
+ Supported_phys and Selected_phys is a bitmask with the following bits.
+ 0 LE 1M TX
+ 1 LE 1M RX
+ 2 LE 2M TX
+ 3 LE 2M RX
+ 4 LE CODED TX
+ 5 LE CODED RX
+
+ LE 1M TX and LE 1M RX would be supported by default.
+
+ This command is only available for LE capable controllers.
+ It will return Not Supported otherwise.
+
+ Possible errors: Not Supported
+ Invalid Index

Command Complete Event
======================
--
2.7.4