2014-09-12 79 views
5

我使用蓝牙低能量连接心率传感器。Android接收太多的蓝牙调试数据

现在我从蓝牙获得在Eclipse这么多logcat的数据,我看到仅此而已。 每秒654行。 我运行代码的手机是HTC的手机。 也许有人知道它出错了吗?

这里是一个例子。

09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.003: E/bt-btm(3108): No PF filter has been configured! 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): HAL bt_gatt_callbacks->client->adv_filter_cb 
09-12 16:16:40.003: E/bt-btm(3108): No PF filter has been configured! 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: D/BtGatt.GattService(3108): onAdvFilterConfig() - action=2 status=1 
09-12 16:16:40.003: E/bt-btm(3108): No PF filter has been configured! 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.003: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.003: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
09-12 16:16:40.013: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.013: D/BtGatt.GattService(3108): onAdvFilterConfig() - action=2 status=1 
09-12 16:16:40.013: E/bt-btm(3108): No PF filter has been configured! 
09-12 16:16:40.013: I/bt-btif(3108): bta_dm_sm_execute event:0x2a 
09-12 16:16:40.013: I/bt-btif(3108): bta_brcm_evt_hdlr :0x0007 
+0

看到了同样的btm_ble_adv_filter.c记录,但它只是发生在手机上,而不是在7 – Michael 2014-09-13 05:15:58

+0

我观察到这了Nexus或者在应用程序崩溃时或在执行搜索BLE单元并尝试连接后不久之后发生类似情况。它似乎持续下去,直到你重新启动手机: -/ – CodeReaper 2015-03-19 14:20:35

回答

0

我不知道什么是蓝牙开关。 但建议您过滤logcat消息。
通过打开过滤器配置,在logcat消息的左侧,您可以添加编辑过滤器配置。点击+或编辑您当前的配置。
它将打开如下图所示的屏幕。
仅过滤您的应用程序日志,你必须把你的包ID上的应用程序名称:过滤:
最重要的是你通过登录标签发生在。你可以放一个拒绝正则表达式来排除特定的标签,它会是这样的:^(?!bt-btif)
filter configuration
我希望帮助。

+1

忽略这些消息可能不是一个好主意,我怀疑这些消息是我正在经历的耗电源。 – CodeReaper 2015-03-25 19:50:42

0

那么,这些日志由本机库,以帮助开发人员调试应用程序,除非你有蓝牙模块的问题打印出来,它应该不会造成麻烦。

基本上PF Filter只是一个分组过滤器,这意味着,所有的分组是从客户端接受的,而不是具有规则来阻止一些。

从外部/蓝牙/ bluedroid /堆栈/ BTM/

if (NULL == p_bda_filter || 
    /* not a generic filter */ 
    (p_target != NULL && p_bda_filter)) 
{ 
    BTM_TRACE_ERROR("Error: Can not clear filter, No PF filter has been configured!"); 
    return st; 
}