我有一個BLE外圍設備。我無法使用BluetoothLeGatt示例android應用程序連接到它,並且Android Market中沒有其他BLE應用程序。但iOS BLE應用程序可以連接到它。這是BluetoothLeGatt連接日誌:iOS和Android之間的區別藍牙低功耗連接
07-21 21:06:37.506 27402-27420/bluetoothlegatt D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=xx:xx:xx:xx:xx:xx, mScanRecord=ScanRecord [mAdvertiseFlags=2, mServiceUuids=null, mManufacturerSpecificData={}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=TestBLE], mRssi=-82, mTimestampNanos=12459248011929}
07-21 21:06:37.506 27402-27402/bluetoothlegatt D/BluetoothDevice: mAddress: xx:xx:xx:xx:xx:xx
07-21 21:06:37.516 27402-27402/bluetoothlegatt D/BluetoothDevice: mAddress: xx:xx:xx:xx:xx:xx
07-21 21:06:40.930 27402-27402/bluetoothlegatt D/BluetoothAdapter: stopLeScan()
07-21 21:07:50.754 27402-27402/bluetoothlegatt D/BluetoothDevice: mAddress: xx:xx:xx:xx:xx:xx
07-21 21:07:50.764 27402-27402/bluetoothlegatt D/BluetoothAdapter: stopLeScan()
07-21 21:07:50.764 27402-27402/bluetoothlegatt D/BluetoothAdapter: scan not started yet
07-21 21:07:50.924 27402-27402/bluetoothlegatt D/BluetoothDevice: mAddress: xx:xx:xx:xx:xx:xx
07-21 21:07:50.924 27402-27402/bluetoothlegatt D/BluetoothGatt: connect() - device: xx:xx:xx:xx:xx:xx, auto: false
07-21 21:07:50.924 27402-27402/bluetoothlegatt D/BluetoothGatt: registerApp()
07-21 21:07:50.924 27402-27402/bluetoothlegatt D/BluetoothGatt: registerApp() - UUID=xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx
07-21 21:07:50.924 27402-27420/bluetoothlegatt D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
07-21 21:07:50.924 27402-27420/bluetoothlegatt D/BluetoothDevice: mAddress: xx:xx:xx:xx:xx:xx
07-21 21:07:50.934 27402-27402/bluetoothlegatt D/BluetoothLeService: Trying to create a new connection.
07-21 21:07:56.060 27402-27421/bluetoothlegatt D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=xx:xx:xx:xx:xx:xx
07-21 21:07:56.060 27402-27421/bluetoothlegatt D/BluetoothDevice: mAddress: xx:xx:xx:xx:xx:xx
07-21 21:07:56.060 27402-27421/bluetoothlegatt I/BluetoothLeService: Disconnected from GATT server.
我應該怎麼做才能連接到此設備? Android和iOS BLE連接到BLE外圍設備的區別是什麼?
更新: 我的Android設備:
的HTC One M7。 Android版本:5.0.2
LG Nexus 5X。 Android版本:6.0.1
我更新我的職務。我的HTC One M7與Android 5.0.2和LG Nexus 5X與Android 6.0.1發生此問題。廣告間隔100 - 200毫秒。 Android設備延遲3到5秒後會出現連接錯誤。 iOS設備立即連接到BLE設備。 – BadEugene