I am working on android bluetooth stack ported for a handset.It
involves android framework connected to bluez stack connected thru JNI
and d-bus.
I have found some debug messages,some of which use DBG,SDPDBG, printf,
sprintf etc.. and files with no debug logs. I want to enable these
logs and add more logs(also in files with no debug logs present) to
understand the code flow for particular test cases in HFP,HID ,A2DP
etc.
Can anyone explain how to enable debug logs in the bluez user space
code(LINUX/android/external/bluetooth/bluez) and in JNI and where to
look for these logs?
Thanks,
Anil
service bluetoothd /system/bin/bluetoothd -n
is changed to
service bluetoothd /system/bin/logwrapper -x /system/bin/bluetoothd -d
Then build it and tested. But I am not able to turn on bluetooth.
Is there any other steps I need to do?
Best Regards,
Anil
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform@googlegroups.com.
To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
Hi Ramakrishna,
Please guide me to enabe bluez logs. I am not sure whether I have done the modifications correctly as you mentioned. find below the changes I have done.
I tried to enable logs in a2dp.c which is in the same location(external\bluetooth\bluez\audio) as liba2dp.c by doing the below steps.
In a2dp.c,
for step 1 you mentioned: there is already an #include "log.h". I commeneted this and added #include util/log.h.
for step 2: Added the below statements
#define ENABLE_DEBUG
#ifdef ENABLE_DEBUG
#define DBG LOGD
#else
#define DBG(fmt, arg...)
#endif
for step3: In the location external\bluetooth\bluez\audio, there is an Android.mk file. In this file, I found libcutils in the section
LOCAL_SHARED_LIBRARIES := \
libbt-aptx-2.3 \
libcutils
So I did not modify this file.
But after doing these changes, build failed.
Could you please explain in detail how to do the below steps in all the files in external\bluetooth\ to get bluez userspace logs.
I tried to enable logs in the following way also.
In most of the bluez files, DBG macro is used for logging. I have changed the value of the macro BTD_DEBUG_FLAG_DEFAULT to 1 from 0 so as to make the if condition in the DBG definition to be true and execute btd_debug("%s:%s() " fmt, __FILE__, __FUNCTION__ , ## arg).
But still logs are not getting printed to the adb log. How to get logs printed by vsyslog(DBG calls btd_debug which calls vsyslog)?
In the Vsyslog,LOG_DEBUG macro is used and I found from syslog.h that there are different log levels(LOG_EMERG,LOG_ALERT etc..). Is this the reason for not getting the logs? Do I need to change to the log level with higher priority?
Thanks,
Anil