2018-10-10 09:55:34

by C K

[permalink] [raw]
Subject: How to enable "util_debug" function in att.c

Hello,
How to see output log from "util_debug" function in att.c
I searched it for few days but I don't have any clue yet.
How can I see the logs in console?
(Env. - linux and bluez5.41.)

I found enabling daemon log by adding "-d" flag in bluetooth.service
file but it's not what I want.



Thanks,
Calvin


2018-10-10 10:36:42

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: How to enable "util_debug" function in att.c

Hi Calvin,


On Wed, Oct 10, 2018 at 12:58 PM Calvin Yoo <[email protected]> wrote:
>
> Hello,
> How to see output log from "util_debug" function in att.c
> I searched it for few days but I don't have any clue yet.
> How can I see the logs in console?
> (Env. - linux and bluez5.41.)
>
> I found enabling daemon log by adding "-d" flag in bluetooth.service
> file but it's not what I want.

Usually the code linking with bt_att needs to call bt_att_set_debug:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/shared/att.h#n51

This is done for example by test-gatt:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/unit/test-gatt.c#n661

--
Luiz Augusto von Dentz