当我尝试打开通知后连接ble时,但通常返回BleGattException status = 133,有时它不会。
这是我的密码:
mConnectingDevice.establishConnection(false)
.doOnNext(this::storeConnect)
.flatMap(rxBleConnection -> rxBleConnection.setupNotification(notifyUuid))
.observeOn(AndroidSchedulers.mainThread())
.flatMap(notificationObservable -> notificationObservable)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::onNotify, this::connectFail);connectFail返回BleGattException状态= 133
这是我的评论后面的打印日志//:
08-22 14:12:00.777 31399-31399/com.evan.yeeuusample D/BluetoothAdapter: STATE_ON
08-22 14:12:00.781 31399-31399/com.evan.yeeuusample D/BluetoothGatt: connect() - device: F0:65:A0:1A:20:16, auto: false MConnectingDevice.establishConnection(假)
08-22 14:12:00.781 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp()
08-22 14:12:00.782 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp() - UUID=58cec16e-bb91-4603-bd28-11da0e5e17c0
08-22 14:12:00.785 31399-31410/com.evan.yeeuusample D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
08-22 14:12:02.965 31399-31410/com.evan.yeeuusample D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5
device=F0:65:A0:1A:20:16 连接状态133
08-22 14:12:02.969 31399-31399/com.evan.yeeuusample D/BluetoothManager: getConnectionState()
08-22 14:12:02.970 31399-31399/com.evan.yeeuusample D/BluetoothManager: getConnectedDevices
08-22 14:12:02.997 31399-31399/com.evan.yeeuusample D/BluetoothGatt: close() 连接失败关贸总协定接近
08-22 14:12:02.997 31399-31399/com.evan.yeeuusample D/BluetoothGatt: unregisterApp() - mClientIf=5继续尝试连接:
08-22 14:17:35.278 31399-31399/com.evan.yeeuusample D/BluetoothGatt: connect() - device: F0:65:A0:1A:20:16, auto: false
08-22 14:17:35.278 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp()
08-22 14:17:35.278 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp() - UUID=b8fa445c-aab2-46d1-b2c2-e67bb475caf9
08-22 14:17:35.280 31399-31411/com.evan.yeeuusample D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
08-22 14:17:43.666 31399-31441/com.evan.yeeuusample D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=F0:65:A0:1A:20:16再次连接失败!有什么解决办法吗?我不知道为什么连接状态是133,关贸总协定已经关闭!现在这种情况经常发生,帮我谢谢你。
发布于 2017-08-29 07:29:24
请使用nRF连接应用程序测试您的设备:https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp
如果该应用程序可以连接到您的设备,我认为问题的rxble。
https://stackoverflow.com/questions/45858151
复制相似问题