2014-05-14 13:18:00

by Andrzej Kaczmarek

[permalink] [raw]
Subject: [PATCH 1/2] doc: Fix bit numbering in mgmt-api

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

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index cd5cd24..9374f9d 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -214,20 +214,20 @@ Read Controller Information Command
Current_Settings & Supported_Settings is a bitmask with
currently the following available bits:

- 1 Powered
- 2 Connectable
- 3 Fast Connectable
- 4 Discoverable
- 5 Pairable
- 6 Link Level Security (Sec. mode 3)
- 7 Secure Simple Pairing
- 8 Basic Rate/Enhanced Data Rate
- 9 High Speed
- 10 Low Energy
- 11 Advertising
- 12 Secure Connections
- 13 Debug Keys
- 14 Privacy
+ 0 Powered
+ 1 Connectable
+ 2 Fast Connectable
+ 3 Discoverable
+ 4 Pairable
+ 5 Link Level Security (Sec. mode 3)
+ 6 Secure Simple Pairing
+ 7 Basic Rate/Enhanced Data Rate
+ 8 High Speed
+ 9 Low Energy
+ 10 Advertising
+ 11 Secure Connections
+ 12 Debug Keys
+ 13 Privacy

This command generates a Command Complete event on success or
a Command Status event on failure.
@@ -1270,9 +1270,9 @@ Start Discovery Command
Possible values for the Address_Type parameter are a bit-wise or
of the following bits:

- 1 BR/EDR
- 2 LE Public
- 3 LE Random
+ 0 BR/EDR
+ 1 LE Public
+ 2 LE Random

By combining these e.g. the following values are possible:

--
1.9.3



2014-05-14 13:18:01

by Andrzej Kaczmarek

[permalink] [raw]
Subject: [PATCH 2/2] lib: Update indexes in mgmt string translation arrays

---
lib/mgmt.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/mgmt.h b/lib/mgmt.h
index ab45735..9bdd341 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -561,7 +561,7 @@ static const char *mgmt_op[] = {
"Confirm Name",
"Block Device",
"Unblock Device",
- "Set Device ID",
+ "Set Device ID", /* 0x0028 */
"Set Advertising",
"Set BR/EDR",
"Set Static Address",
@@ -569,7 +569,7 @@ static const char *mgmt_op[] = {
"Set Secure Connections",
"Set Debug Keys",
"Set Privacy",
- "Load Identity Resolving Keys",
+ "Load Identity Resolving Keys", /* 0x0030 */
};

static const char *mgmt_ev[] = {
@@ -597,7 +597,7 @@ static const char *mgmt_ev[] = {
"Device Unblocked",
"Device Unpaired",
"Passkey Notify",
- "New Identity Resolving Key",
+ "New Identity Resolving Key", /* 0x0018 */
"New Signature Resolving Key",
};

@@ -610,7 +610,7 @@ static const char *mgmt_status[] = {
"Authentication Failed",
"Not Paired",
"No Resources",
- "Timeout",
+ "Timeout", /* 0x08 */
"Already Connected",
"Busy",
"Rejected",
@@ -618,7 +618,7 @@ static const char *mgmt_status[] = {
"Invalid Parameters",
"Disconnected",
"Not Powered",
- "Cancelled",
+ "Cancelled", /* 0x10 */
"Invalid Index",
"Blocked through rfkill",
};
--
1.9.3


2014-06-16 10:42:30

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCH 2/2] lib: Update indexes in mgmt string translation arrays

Hi Andrzej,

On Wednesday 14 of May 2014 15:18:01 Andrzej Kaczmarek wrote:
> ---
> lib/mgmt.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/lib/mgmt.h b/lib/mgmt.h
> index ab45735..9bdd341 100644
> --- a/lib/mgmt.h
> +++ b/lib/mgmt.h
> @@ -561,7 +561,7 @@ static const char *mgmt_op[] = {
> "Confirm Name",
> "Block Device",
> "Unblock Device",
> - "Set Device ID",
> + "Set Device ID", /* 0x0028 */
> "Set Advertising",
> "Set BR/EDR",
> "Set Static Address",
> @@ -569,7 +569,7 @@ static const char *mgmt_op[] = {
> "Set Secure Connections",
> "Set Debug Keys",
> "Set Privacy",
> - "Load Identity Resolving Keys",
> + "Load Identity Resolving Keys", /* 0x0030 */
> };
>
> static const char *mgmt_ev[] = {
> @@ -597,7 +597,7 @@ static const char *mgmt_ev[] = {
> "Device Unblocked",
> "Device Unpaired",
> "Passkey Notify",
> - "New Identity Resolving Key",
> + "New Identity Resolving Key", /* 0x0018 */
> "New Signature Resolving Key",
> };
>
> @@ -610,7 +610,7 @@ static const char *mgmt_status[] = {
> "Authentication Failed",
> "Not Paired",
> "No Resources",
> - "Timeout",
> + "Timeout", /* 0x08 */
> "Already Connected",
> "Busy",
> "Rejected",
> @@ -618,7 +618,7 @@ static const char *mgmt_status[] = {
> "Invalid Parameters",
> "Disconnected",
> "Not Powered",
> - "Cancelled",
> + "Cancelled", /* 0x10 */
> "Invalid Index",
> "Blocked through rfkill",
> };
>

This needs to be rebased.

--
Best regards,
Szymon Janc

2014-06-16 10:41:47

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCH 1/2] doc: Fix bit numbering in mgmt-api

Hi Andrzej,

On Wednesday 14 of May 2014 15:18:00 Andrzej Kaczmarek wrote:
> ---
> doc/mgmt-api.txt | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index cd5cd24..9374f9d 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -214,20 +214,20 @@ Read Controller Information Command
> Current_Settings & Supported_Settings is a bitmask with
> currently the following available bits:
>
> - 1 Powered
> - 2 Connectable
> - 3 Fast Connectable
> - 4 Discoverable
> - 5 Pairable
> - 6 Link Level Security (Sec. mode 3)
> - 7 Secure Simple Pairing
> - 8 Basic Rate/Enhanced Data Rate
> - 9 High Speed
> - 10 Low Energy
> - 11 Advertising
> - 12 Secure Connections
> - 13 Debug Keys
> - 14 Privacy
> + 0 Powered
> + 1 Connectable
> + 2 Fast Connectable
> + 3 Discoverable
> + 4 Pairable
> + 5 Link Level Security (Sec. mode 3)
> + 6 Secure Simple Pairing
> + 7 Basic Rate/Enhanced Data Rate
> + 8 High Speed
> + 9 Low Energy
> + 10 Advertising
> + 11 Secure Connections
> + 12 Debug Keys
> + 13 Privacy
>
> This command generates a Command Complete event on success or
> a Command Status event on failure.
> @@ -1270,9 +1270,9 @@ Start Discovery Command
> Possible values for the Address_Type parameter are a bit-wise or
> of the following bits:
>
> - 1 BR/EDR
> - 2 LE Public
> - 3 LE Random
> + 0 BR/EDR
> + 1 LE Public
> + 2 LE Random
>
> By combining these e.g. the following values are possible:
>
>

This patch is now applied, thanks.

--
Best regards,
Szymon Janc