Moto G蓝牙低功耗(BLE)配对问题

Pra*_*ant 7 android bluetooth bluetooth-lowenergy android-bluetooth

我已经创建了使用血糖仪的样本应用程序.示例应用程序具有配对,连接和从仪表等获取数据的选项.我正在使用Google BLE API来实现此目的.

问题:

  1. 几乎70%的时间,Moto G从未通过BLE扫描发现血糖仪.
  2. 如果它发现并且示例应用程序试图配对,则配对失败.
  3. 非常少数样品应用成功与血糖仪配对.之后,如果应用程序尝试从血糖仪中获取数据,则仪表将从Moto G中取消配对.

当我们尝试将血糖仪与标准蓝牙配对程序配对时,观察到相同的问题.我们尝试了4-5种不同的血糖仪,但问题仍然存在.示例应用程序适用于三星Galaxy S5,HTC ONE,Samsung Note II和III,LG G2等不同的其他设备.

Moto G中是否有任何已知的BLE问题?如何解决上述问题?

建立:

•Moto G - Android版本4.4.2

•Eclipse Indigo.

我给出了我的示例应用程序的日志以供参考.

05-09 11:20:14.353: D/-GlucoseProfileHelper-9(11851): Device Connected.
05-09 11:20:14.354: I/-GlucoseProfileHelperGoogle-9(11851): Pairing Callback onDeviceConnected
05-09 11:20:14.356: I/-TimeOutThread(11851): resetTimer
05-09 11:20:14.436: I/-GoogleGatt-9(11851): IN onDescriptorWrite
05-09 11:20:14.437: I/-TimeOutThread(11851): resetTimer
05-09 11:20:14.439: I/-GoogleGatt-9(11851): characteristic=00002a18-0000-1000-8000-00805f9b34fb, status = 5
05-09 11:20:14.541: V/-BleConnectionManager-9(11851): android.bluetooth.device.action.BOND_STATE_CHANGED
05-09 11:20:14.543: E/-BleConnectionManager-9(11851): BOND STATE CHANGE00:11:22:33:44:55
05-09 11:20:14.555: I/-BtEventReceiver-9(11851): Device : 00:11:22:33:44:55
05-09 11:20:14.555: I/-BtEventReceiver-9(11851): Previous Bond State =(BOND_NONE)
05-09 11:20:14.555: I/-BtEventReceiver-9(11851): current state :(BOND_BONDING)
05-09 11:20:44.081: D/-GoogleTSGattCallback-9(11851): onConnectionStateChange  00:11:22:33:44:55 old status = 0, New state = disconnected
05-09 11:20:44.104: I/-GoogleGatt-9(11851): onConnectionStateChange - state = 0, Status = 0
05-09 11:20:44.104: D/-Profile-9(11851): Device disconnected
05-09 11:20:44.104: I/-GlucoseProfileHelperGoogle-9(11851): Pairing Callback onDeviceDisconnected
05-09 11:20:44.105: I/-GlucoseProfileHelper-9(11851): Pairing Callback - sending Constants.ACTION_BLE_PAIRING_INITIATION_FAILED broadcast
05-09 11:20:44.137: V/-BleConnectionManager-9(11851): android.bluetooth.device.action.BOND_STATE_CHANGED
05-09 11:20:44.138: E/-BleConnectionManager-9(11851): BOND STATE CHANGE00:11:22:33:44:55
05-09 11:20:44.180: I/-BleConnectionManager-9(11851): Pairing Finished
05-09 11:20:44.181: I/-BleConnectionManager-9(11851): Started - moveToNextStateToPairing - BEGIN
05-09 11:20:44.184: I/-BtEventReceiver-9(11851): Device : 00:11:22:33:44:55
05-09 11:20:44.184: I/-BtEventReceiver-9(11851): Previous Bond State =(BOND_BONDING)
05-09 11:20:44.184: I/-BtEventReceiver-9(11851): current state :(BOND_NONE)
05-09 11:20:44.184: V/-BleConnectionManager-9(11851): com.ble.action.ble_pairing_initiation_faied
05-09 11:20:44.688: I/-TimeOutThread(11851): Thread is stopped at counter =56
05-09 11:20:44.724: I/-TimeOutThread(11851): Thread is stopped at counter =4
05-09 11:20:45.181: I/-BleConnectionManager-9(11851): Moving to Scan state
05-09 11:20:45.181: I/-BleScanner-9(11851): startDeviceScan
05-09 11:20:45.182: I/-BleScanner-9(11851): Init Adapter retValue = true
05-09 11:20:45.182: I/-BleConnectionManager-state-9(11851): Device - NULL , State - Scanning
05-09 11:20:45.182: W/-BleConnectionManager-9(11851): Started - moveToNextStateToPairing - END
05-09 11:20:45.184: D/-BleBroadcastReceiver-9(11851): BleBroadcastReceiver
05-09 11:20:45.186: D/-BleBroadcastReceiver-9(11851): startBluetoothDiscovery called.
05-09 11:20:45.201: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_STARTEDo.?@420a11c8
05-09 11:20:57.213: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_FINISHED.
05-09 11:20:57.213: D/-BleBroadcastReceiver-9(11851): startBluetoothDiscovery called.
05-09 11:20:57.220: I/-GoogleBleAdapter-9(11851): Timer canceled
05-09 11:20:57.223: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_STARTEDo.?@420a11c8
05-09 11:20:57.223: I/-BleBroadcastReceiver-ScanMonitorThread-9(11851): Monitor Thread Interrupted
05-09 11:21:02.355: I/-BleBroadcastReceiver-9(11851):  device Found -> address ->00:11:22:33:44:55, Bonded state : Not bonded
05-09 11:21:09.225: I/-GoogleBleAdapter-9(11851): Timer canceled
05-09 11:21:09.226: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_FINISHED.
05-09 11:21:09.226: D/-BleBroadcastReceiver-9(11851): startBluetoothDiscovery called.
05-09 11:21:09.230: I/-BleBroadcastReceiver-ScanMonitorThread-9(11851): Monitor Thread Interrupted
05-09 11:21:09.231: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_STARTEDo.?@420a11c8
05-09 11:21:09.258: I/-BleBroadcastReceiver-9(11851):  device Found -> address ->00:11:22:33:44:55, Bonded state : Not bonded
05-09 11:21:21.252: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_FINISHED.
05-09 11:21:21.252: D/-BleBroadcastReceiver-9(11851): startBluetoothDiscovery called.
05-09 11:21:21.258: I/-GoogleBleAdapter-9(11851): Timer canceled
05-09 11:21:21.260: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_STARTEDo.?@420a11c8
05-09 11:21:21.261: I/-BleBroadcastReceiver-ScanMonitorThread-9(11851): Monitor Thread Interrupted
05-09 11:21:21.296: I/-BleBroadcastReceiver-9(11851):  device Found -> address ->00:11:22:33:44:55, Bonded state : Not bonded
05-09 11:21:33.269: D/-BleBroadcastReceiver-9(11851): ACTION_BLE_DISCOVERY_FINISHED.
Run Code Online (Sandbox Code Playgroud)