我正在尝试连接到AnD UA-651BLE血压监测器,并在一个安卓应用程序中获取值。这个应用程序可以找到设备,但我在“onConnectionStateChange”中找到了Type_Gatt_Error。
这在三星星系S5、Moto G4等设备上运行得很好,但对于某些手机,如redmi 3s prime等,则不起作用。
这是很好的工作,我能够读取数据,当我取消对设备,并重新对它每次。我无法理解任何东西,因为我是新的android-ble集成。我试图将目标SDK版本更改为21和23,因为我主要使用的是Android5.0.1及以上设备。但没有运气
我发现门户网站上有很多人提出了类似的问题,但我没有发现任何解决方案对我有帮助。
有谁能让我明白为什么会发生这种情况,以及可能的解决方案是什么?
下面是我在Android中获得的日志:
D/MYTAG: DashBoard UnBonded Device false true
D/MYTAG: Found device - =*******************A&D_UA-651BLE_459701
D/SN: RESU connectDevice device 6C:EC:EB:45:97:01
D/BluetoothManager: getConnectionState()
D/BluetoothManager: getConnectedDevices
W/SN: RESU Attempt to connect in state: 0
D/BluetoothGatt: connect() - device: 6C:EC:EB:45:97:01, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=e7ed0993-f27a-4e2a-bc08-93b76d55a4d5
D/SN: RESU bluetoothGatt android.bluetooth.BluetoothGatt@47015f2
D/MYTAG: CAlling connectDevice from Dashboard REPLY= true
D/BluetoothAdapter: stopLeScan()
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/BluetoothAdapter: STATE_ON
D/MYTAG: DashBoard UnBonded Device true true
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=6C:EC:EB:45:97:01
D/SN: RESU Inside bluetoothGattCallback : onConnectionStateChange
D/SN: MYTAG DashBoard onReceive TYPE_GATT_ERROR
D/SN: RESU onConnectionStateChange()6C:EC:EB:45:97:01, A&D_UA-651BLE_459701, status=133 newState=0
D/SN: MYTAG Disconnect Device
D/SN: MYTAG DashBoard onReceive TYPE_GATT_DISCONNECTED
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothGatt: cancelOpen() - device: 6C:EC:EB:45:97:01
D/MYTAG: *********** CAlling startLeScan
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=9
I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
D/MYTAG: Found device - =*******************A&D_UA-651BLE_459701
D/SN: RESU connectDevice device 6C:EC:EB:45:97:01
D/BluetoothManager: getConnectionState()
D/BluetoothManager: getConnectedDevices
W/SN: RESU Attempt to connect in state: 0
D/BluetoothGatt: connect() - device: 6C:EC:EB:45:97:01, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=c9f450d6-a78e-4190-8c8c-89ce7c5bcb17
D/SN: RESU bluetoothGatt android.bluetooth.BluetoothGatt@a2caac0
D/MYTAG: CAlling connectDevice from Dashboard REPLY= true
D/BluetoothAdapter: stopLeScan()
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/BluetoothAdapter: STATE_ON
D/MYTAG: DashBoard UnBonded Device true true
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=6C:EC:EB:45:97:01
D/SN: RESU Inside bluetoothGattCallback : onConnectionStateChange
D/SN: MYTAG DashBoard onReceive TYPE_GATT_ERROR
D/SN: RESU onConnectionStateChange()6C:EC:EB:45:97:01, A&D_UA-651BLE_459701, status=133 newState=0
D/SN: MYTAG Disconnect Device
D/SN: MYTAG DashBoard onReceive TYPE_GATT_DISCONNECTED
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothGatt: cancelOpen() - device: 6C:EC:EB:45:97:01
D/MYTAG: *********** CAlling startLeScan
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=9
I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
D/MYTAG: Found device - =*******************A&D_UA-651BLE_459701
D/SN: RESU connectDevice device 6C:EC:EB:45:97:01
D/BluetoothManager: getConnectionState()
D/BluetoothManager: getConnectedDevices
W/SN: RESU Attempt to connect in state: 0
D/BluetoothGatt: connect() - device: 6C:EC:EB:45:97:01, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=04b0cc2e-ee24-4515-b41b-d93d1fb54aa3
D/SN: RESU bluetoothGatt android.bluetooth.BluetoothGatt@c659f3e
D/MYTAG: CAlling connectDevice from Dashboard REPLY= true
D/BluetoothAdapter: stopLeScan()
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/BluetoothAdapter: STATE_ON
D/MYTAG: DashBoard UnBonded Device true true
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=6C:EC:EB:45:97:01
D/SN: RESU Inside bluetoothGattCallback : onConnectionStateChange
D/SN: MYTAG DashBoard onReceive TYPE_GATT_ERROR
D/SN: RESU onConnectionStateChange()6C:EC:EB:45:97:01, A&D_UA-651BLE_459701, status=133 newState=0
D/SN: MYTAG Disconnect Device
D/SN: MYTAG DashBoard onReceive TYPE_GATT_DISCONNECTED
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothGatt: cancelOpen() - device: 6C:EC:EB:45:97:01
D/MYTAG: *********** CAlling startLeScan
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=9
I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
D/MYTAG: Found device - =*******************Mi Band HRX
D/MYTAG: DashBoard UnBonded Device false true
D/MYTAG: Found device - =*******************null发布于 2018-09-12 15:56:27
关贸总协定133错误没有一个单一的答案。但在过去,我收到它们的原因如下:
LE General Discoverable Mode。要调试,我喜欢使用两个应用程序:
我认为这个应用程序使用的是Android平台的BLE库。因此,如果我的应用程序不能连接,我会再次检查他们的应用程序也不能连接,如果可以的话,我的代码很可能出了问题。
我认为这个应用程序与BLE的工作水平低于Android库。有时,我的应用程序和LightBlue可以得到133个,但nRF连接可以成功连接。但是,如果它真的失败了133,大部分时间,它是因为另一个设备已经连接到BLE设备,或者它是拔出,需要重置。这个应用程序还能够连接到我们的BLE设备,在上面的第四个项目。
https://stackoverflow.com/questions/52268499
复制相似问题