diff mbox series

[BlueZ,5/5] monitor: Add parsing Service Data of UUID 128

Message ID 20230729004552.1422547-6-lukasz.rymanowski@codecoup.pl (mailing list archive)
State Accepted
Commit 8d60b555e8e18992348662a6d232cba9d19178aa
Headers show
Series Couple of improvements to btmon | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 5: B3 Line contains hard tab characters (\t): " Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d"
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Łukasz Rymanowski July 29, 2023, 12:45 a.m. UTC
In the advertising report, instead of deciding EIR 0x21 into this:

	Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d

We can do bit better

        Service Data UUID 128: Vendor specific
          Data: 01480d130d
---
 monitor/packet.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Paul Menzel July 29, 2023, 4:42 a.m. UTC | #1
Dear Łukasz,


Thank you for your patch.

Am 29.07.23 um 02:45 schrieb Łukasz Rymanowski:
> In the advertising report, instead of deciding EIR 0x21 into this:

Do you mean deciphering?

> 
> 	Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d
> 
> We can do bit better
> 
>          Service Data UUID 128: Vendor specific
>            Data: 01480d130d
> ---
>   monitor/packet.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/monitor/packet.c b/monitor/packet.c
> index 3031b028f..21e08ccef 100644
> --- a/monitor/packet.c
> +++ b/monitor/packet.c
> @@ -3997,6 +3997,18 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
>   			print_service_data(data, data_len);
>   			break;
>   
> +		case BT_EIR_SERVICE_DATA128:
> +			if (data_len <= 16)
> +				break;
> +
> +			print_field("Service Data UUID 128: %s ",
> +						bt_uuid128_to_str(&data[0]));
> +
> +			if (data_len > 16)
> +				print_hex_field("  Data", &data[16],
> +								data_len - 16);
> +
> +			break;
>   		case BT_EIR_RANDOM_ADDRESS:
>   			if (data_len < 6)
>   				break;

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul
Łukasz Rymanowski July 29, 2023, 7:11 p.m. UTC | #2
Hi Paul


On Sat, 29 Jul 2023 at 06:42, Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Łukasz,
>
>
> Thank you for your patch.
>
> Am 29.07.23 um 02:45 schrieb Łukasz Rymanowski:
> > In the advertising report, instead of deciding EIR 0x21 into this:
>
> Do you mean deciphering?

Thanks for pointing it out. Just sent v2 for this patch.

>
> >
> >       Unknown EIR field 0x21: 3a048f2ba97ea6ae1b49c619e973a4a701480d130d
> >
> > We can do bit better
> >
> >          Service Data UUID 128: Vendor specific
> >            Data: 01480d130d
> > ---
> >   monitor/packet.c | 12 ++++++++++++
> >   1 file changed, 12 insertions(+)
> >
> > diff --git a/monitor/packet.c b/monitor/packet.c
> > index 3031b028f..21e08ccef 100644
> > --- a/monitor/packet.c
> > +++ b/monitor/packet.c
> > @@ -3997,6 +3997,18 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
> >                       print_service_data(data, data_len);
> >                       break;
> >
> > +             case BT_EIR_SERVICE_DATA128:
> > +                     if (data_len <= 16)
> > +                             break;
> > +
> > +                     print_field("Service Data UUID 128: %s ",
> > +                                             bt_uuid128_to_str(&data[0]));
> > +
> > +                     if (data_len > 16)
> > +                             print_hex_field("  Data", &data[16],
> > +                                                             data_len - 16);
> > +
> > +                     break;
> >               case BT_EIR_RANDOM_ADDRESS:
> >                       if (data_len < 6)
> >                               break;
>
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
>
>
> Kind regards,
>
> Paul

Best
Łukasz
diff mbox series

Patch

diff --git a/monitor/packet.c b/monitor/packet.c
index 3031b028f..21e08ccef 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3997,6 +3997,18 @@  static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
 			print_service_data(data, data_len);
 			break;
 
+		case BT_EIR_SERVICE_DATA128:
+			if (data_len <= 16)
+				break;
+
+			print_field("Service Data UUID 128: %s ",
+						bt_uuid128_to_str(&data[0]));
+
+			if (data_len > 16)
+				print_hex_field("  Data", &data[16],
+								data_len - 16);
+
+			break;
 		case BT_EIR_RANDOM_ADDRESS:
 			if (data_len < 6)
 				break;