android bluedroid调试

来源:互联网 发布:手机游戏网络加速器 编辑:程序博客网 时间:2024/06/05 14:51

Android设备中,通常有一个文件(/etc/bluetooth/bt_stack.conf)可以设置调试参数

将BtSnoopLogOutput设置为true,就可以将协议包写入文件BtSnoopFileName

将TraceConf设置为true,就可以设置bluedroid对应模块的log输出,比如讲TRC_HCI设置成5,HCI的所有debug信息就会打开,在log中可以看到

# Enable BtSnoop logging function# valid value : true, falseBtSnoopLogOutput=true # BtSnoop log output fileBtSnoopFileName=/data/misc/bluedroid/btsnoop_hci.log # Enable trace level reconfiguration function# Must be present before any TRC_ trace level settingsTraceConf=true # Trace level configuration#   BT_TRACE_LEVEL_NONE    0    ( No trace messages to be generated )#   BT_TRACE_LEVEL_ERROR   1    ( Error condition trace messages )#   BT_TRACE_LEVEL_WARNING 2    ( Warning condition trace messages )#   BT_TRACE_LEVEL_API     3    ( API traces )#   BT_TRACE_LEVEL_EVENT   4    ( Debug messages for events )#   BT_TRACE_LEVEL_DEBUG   5    ( Full debug messages )TRC_BTM=5TRC_HCI=5TRC_L2CAP=5TRC_RFCOMM=5TRC_OBEX=5TRC_AVCT=5TRC_AVDT=5TRC_AVRC=5TRC_AVDT_SCB=5TRC_AVDT_CCB=5TRC_A2D=5TRC_SDP=5TRC_GATT=5TRC_SMP=5TRC_BTAPP=5


这个文件做一次BT on/off就可以生效




0 0
原创粉丝点击