2015-02-13 11:18:03

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH] monitor/l2cap: Add log msg for read_blob_rsp

> ACL Data RX: Handle 71 flags 0x02 dlen 27 [hci0] 79.680052
ATT: Read Blob Response (0x0d) len 22
Part of Attribute Value:
11 22 33 44 55 66 77 88 99 00 12 34 56 78 90 12 ."3DUfw....4Vx..
34 56 78 90 12 34 4Vx..4
---
monitor/l2cap.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index 0030a4c..d58c14f 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -2198,6 +2198,7 @@ static void att_read_blob_req(const struct l2cap_frame *frame)

static void att_read_blob_rsp(const struct l2cap_frame *frame)
{
+ print_field("Part of Attribute Value:");
packet_hexdump(frame->data, frame->size);
}

--
1.9.1



2015-02-16 13:44:58

by Gowtham Anandha Babu

[permalink] [raw]
Subject: RE: [PATCH] monitor/l2cap: Add log msg for read_blob_rsp

Hi Luiz,

> -----Original Message-----
> From: [email protected] [mailto:linux-bluetooth-
> [email protected]] On Behalf Of Luiz Augusto von Dentz
> Sent: Monday, February 16, 2015 6:00 PM
> To: Gowtham Anandha Babu
> Cc: [email protected]; Bharat Panda; [email protected]
> Subject: Re: [PATCH] monitor/l2cap: Add log msg for read_blob_rsp
>
> Hi Gowtham,
>
> On Fri, Feb 13, 2015 at 1:18 PM, Gowtham Anandha Babu
> <[email protected]> wrote:
> >> ACL Data RX: Handle 71 flags 0x02 dlen 27
> [hci0] 79.680052
> > ATT: Read Blob Response (0x0d) len 22
> > Part of Attribute Value:
> > 11 22 33 44 55 66 77 88 99 00 12 34 56 78 90 12 ."3DUfw....4Vx..
> > 34 56 78 90 12 34 4Vx..4
> > ---
> > monitor/l2cap.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 0030a4c..d58c14f
> > 100644
> > --- a/monitor/l2cap.c
> > +++ b/monitor/l2cap.c
> > @@ -2198,6 +2198,7 @@ static void att_read_blob_req(const struct
> > l2cap_frame *frame)
> >
> > static void att_read_blob_rsp(const struct l2cap_frame *frame) {
> > + print_field("Part of Attribute Value:");
> > packet_hexdump(frame->data, frame->size); }
> >
> > --
> > 1.9.1
>
> I would use print_hex_field("Value", frame->data, frame->size); like in
> att_read_rsp if you really want a label.
>

This print_hex_field() removes the junk data's as well.
Sent v1 with the above modification. Thanks !

Regards,
Gowtham Anandha Babu

>
> --
> Luiz Augusto von Dentz
> --
> 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


2015-02-16 12:30:28

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] monitor/l2cap: Add log msg for read_blob_rsp

Hi Gowtham,

On Fri, Feb 13, 2015 at 1:18 PM, Gowtham Anandha Babu
<[email protected]> wrote:
>> ACL Data RX: Handle 71 flags 0x02 dlen 27 [hci0] 79.680052
> ATT: Read Blob Response (0x0d) len 22
> Part of Attribute Value:
> 11 22 33 44 55 66 77 88 99 00 12 34 56 78 90 12 ."3DUfw....4Vx..
> 34 56 78 90 12 34 4Vx..4
> ---
> monitor/l2cap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/monitor/l2cap.c b/monitor/l2cap.c
> index 0030a4c..d58c14f 100644
> --- a/monitor/l2cap.c
> +++ b/monitor/l2cap.c
> @@ -2198,6 +2198,7 @@ static void att_read_blob_req(const struct l2cap_frame *frame)
>
> static void att_read_blob_rsp(const struct l2cap_frame *frame)
> {
> + print_field("Part of Attribute Value:");
> packet_hexdump(frame->data, frame->size);
> }
>
> --
> 1.9.1

I would use print_hex_field("Value", frame->data, frame->size); like
in att_read_rsp if you really want a label.


--
Luiz Augusto von Dentz