diff mbox series

[BlueZ,v2,1/6] tools/mesh-cfgclient: Display unprovisioned OOB data

Message ID 20200401102502.746-2-michal.lowas-rzechonek@silvair.com (mailing list archive)
State Accepted
Delegated to: Brian Gix
Headers show
Series Honor provisioner's capabilities during authentication | expand

Commit Message

Michał Lowas-Rzechonek April 1, 2020, 10:24 a.m. UTC
---
 tools/mesh-cfgclient.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Brian Gix April 1, 2020, 7:10 p.m. UTC | #1
Hi Michał,

This patchset was applied with some style-guide fixes (patches 4 and 5).  Please remember
to run checkpatch prior to submitting patches.

On Wed, 2020-04-01 at 12:24 +0200, Michał Lowas-Rzechonek wrote:
> ---
>  tools/mesh-cfgclient.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c
> index ae13c4409..43588852b 100644
> --- a/tools/mesh-cfgclient.c
> +++ b/tools/mesh-cfgclient.c
> @@ -1533,6 +1533,19 @@ static struct l_dbus_message *scan_result_call(struct l_dbus *dbus,
>  	bt_shell_printf("\t" COLOR_GREEN "UUID = %s\n" COLOR_OFF, str);
>  	l_free(str);
>  
> +	if (n >= 18) {
> +		str = l_util_hexstring_upper(prov_data + 16, 2);
> +		bt_shell_printf("\t" COLOR_GREEN "OOB = %s\n" COLOR_OFF, str);
> +		l_free(str);
> +	}
> +
> +	if (n >= 22) {
> +		str = l_util_hexstring_upper(prov_data + 18, 4);
> +		bt_shell_printf("\t" COLOR_GREEN "URI Hash = %s\n" COLOR_OFF,
> +									str);
> +		l_free(str);
> +	}
> +
>  	/* TODO: Handle the rest of provisioning data if present */
>  
>  	dev = l_queue_find(devices, match_device_uuid, prov_data);
diff mbox series

Patch

diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c
index ae13c4409..43588852b 100644
--- a/tools/mesh-cfgclient.c
+++ b/tools/mesh-cfgclient.c
@@ -1533,6 +1533,19 @@  static struct l_dbus_message *scan_result_call(struct l_dbus *dbus,
 	bt_shell_printf("\t" COLOR_GREEN "UUID = %s\n" COLOR_OFF, str);
 	l_free(str);
 
+	if (n >= 18) {
+		str = l_util_hexstring_upper(prov_data + 16, 2);
+		bt_shell_printf("\t" COLOR_GREEN "OOB = %s\n" COLOR_OFF, str);
+		l_free(str);
+	}
+
+	if (n >= 22) {
+		str = l_util_hexstring_upper(prov_data + 18, 4);
+		bt_shell_printf("\t" COLOR_GREEN "URI Hash = %s\n" COLOR_OFF,
+									str);
+		l_free(str);
+	}
+
 	/* TODO: Handle the rest of provisioning data if present */
 
 	dev = l_queue_find(devices, match_device_uuid, prov_data);