Nexus 9上的蓝牙LE连接问题

时间:2016-01-28 19:53:51

标签: android bluetooth-lowenergy

目前我正在测试使用蓝牙LE的应用。我已经让应用程序正常工作,问题是在Nexus 9上,GATT连接会定期断开,看似没有理由&我必须完全重启连接。这不会发生在我使用的其他设备上(LG G4)。

查看系统日志时,它会告诉我发生了什么,但我不知道如何解决它。

693-913/? W/BluetoothEventManager: CachedBluetoothDevice for device 00:20:62:00:12:03 not found, calling readPairedDevices().
693-913/? E/BluetoothEventManager: Got bonding state changed for 00:20:62:00:12:03, but we have no record of that device.
16562-16648/? W/bt_btif: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0022
16562-16648/? W/bt_btif: bta_gattc_conn_cback() - cif=4 connected=0 conn_id=4 reason=0x0022
16562-16648/? W/bt_btif: bta_gattc_conn_cback() - cif=5 connected=0 conn_id=5 reason=0x0022
16562-16648/? I/bt_btm_sec: btm_sec_disconnected clearing pending flag handle:64 reason:34
16562-16648/? E/bt_btif: bta_gattc_mark_bg_conn unable to find the bg connection mask for: 00:20:62:00:12:03  //<-- the device address
16562-16626/? D/BtGatt.GattService: onDisconnected() - clientIf=5, connId=5, address=00:20:62:00:12:03
3434-3445/com.blabla D/BluetoothGatt: onClientConnectionState() - status=34 clientIf=5 device=00:20:62:00:12:03
16562-16626/? E/BluetoothRemoteDevices: state12newState1
3434-3445/com.blabla E/Bluetooth: onConnectionStateChange:
                                                                 Device  -> LE_Dual_SPK
                                                                 Address -> 00:20:62:00:12:03
                                                                 State   -> Disconnected

这是我的代码的问题还是广域芯片的问题?

1 个答案:

答案 0 :(得分:4)

哦,Android,你是如何困扰我的。

这是因为Nexus允许我连接到&amp;与设备通信而不实际绑定到它。因此,当系统检查其连接状态时,它无法找到掩码,将其标记为错误连接并将其转储。