2017-07-26 05:40:38

by Frédéric Dalleau

[permalink] [raw]
Subject: [PATCH 0/2] Fixes in monitor mesh

Hi, I came across those two things, so here are some patches.
Regards,

Frédéric Dalleau (2):
monitor: Fix OOB information bit in mesh oob table
monitor: Format URI hash using 8 hex digits

monitor/packet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--
2.11.0



2017-07-26 07:57:07

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [PATCH 2/2] monitor: Format URI hash using 8 hex digits

Oh, I wasn't sure, let me update.

Regards,
Fred

On 26/07/2017 09:45, Marcel Holtmann wrote:
> Hi Fred,
>
>> URI hash is a 32 bits value.
>> ---
>> monitor/packet.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/monitor/packet.c b/monitor/packet.c
>> index f72fcab6a..994f5b259 100644
>> --- a/monitor/packet.c
>> +++ b/monitor/packet.c
>> @@ -3551,7 +3551,7 @@ static void print_mesh_beacon(const uint8_t *data, uint8_t len)
>> break;
>> }
>>
>> - print_field(" URI Hash: 0x%4.4x", get_be32(data + 19));
>> + print_field(" URI Hash: 0x%08x", get_be32(data + 19));
>
> in btmon we use the 0x%8.8x notation then.
>
> Regards
>
> Marcel
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

2017-07-26 07:45:25

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH 2/2] monitor: Format URI hash using 8 hex digits

Hi Fred,

> URI hash is a 32 bits value.
> ---
> monitor/packet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/monitor/packet.c b/monitor/packet.c
> index f72fcab6a..994f5b259 100644
> --- a/monitor/packet.c
> +++ b/monitor/packet.c
> @@ -3551,7 +3551,7 @@ static void print_mesh_beacon(const uint8_t *data, uint8_t len)
> break;
> }
>
> - print_field(" URI Hash: 0x%4.4x", get_be32(data + 19));
> + print_field(" URI Hash: 0x%08x", get_be32(data + 19));

in btmon we use the 0x%8.8x notation then.

Regards

Marcel


2017-07-26 05:40:39

by Frédéric Dalleau

[permalink] [raw]
Subject: [PATCH 1/2] monitor: Fix OOB information bit in mesh oob table

The bit 15 should be used for 'On device'.
---
monitor/packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index 387be1dcb..f72fcab6a 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3514,7 +3514,7 @@ static const struct {
{ 12, "Inside box" },
{ 13, "On piece of paper" },
{ 14, "Inside manual" },
- { 14, "On device" },
+ { 15, "On device" },
{ }
};

--
2.11.0


2017-07-26 05:40:40

by Frédéric Dalleau

[permalink] [raw]
Subject: [PATCH 2/2] monitor: Format URI hash using 8 hex digits

URI hash is a 32 bits value.
---
monitor/packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index f72fcab6a..994f5b259 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3551,7 +3551,7 @@ static void print_mesh_beacon(const uint8_t *data, uint8_t len)
break;
}

- print_field(" URI Hash: 0x%4.4x", get_be32(data + 19));
+ print_field(" URI Hash: 0x%08x", get_be32(data + 19));
packet_hexdump(data + 23, len - 23);
break;
case 0x01:
--
2.11.0