2018-02-28 07:49:09

by Jaganath K

[permalink] [raw]
Subject: [v5 PATCH 1/3] 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



2018-02-28 08:26:31

by ERAMOTO Masaya

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

Hi Jaganath,

On 02/28/2018 04:49 PM, Jaganath Kanakkassery wrote:
> 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

nitpick: better to use tab instead of whitespaces


> + 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.

s/Default_phy/Default_phys/


Regards,
Eramoto


> + 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.
>


2018-02-28 08:26:29

by ERAMOTO Masaya

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

Hi Jaganath,

On 02/28/2018 04:49 PM, Jaganath Kanakkassery wrote:
> ---
> 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

nitpick: better to use tab instead of whitespaces


Regards,
Eramoto

>
> 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
> ======================
>


2018-02-28 07:49:11

by Jaganath K

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

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

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 628ff18..0ded97d 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
+ 7 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,16 @@ 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 either LE 1M or LE 2M will result in using
+ extended advertising on the primary channel with LE 1M and the
+ respectively LE 1M or LE 2M on the secondary channel. Choosing
+ LE Coded will result in using extended advertising on the primary
+ and secondary channels with 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


2018-02-28 07:49:10

by Jaganath K

[permalink] [raw]
Subject: [v5 PATCH 2/3] 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