首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BleGattException状态返回133 (onClientConnectionState() - status=133)

BleGattException状态返回133 (onClientConnectionState() - status=133)
EN

Stack Overflow用户
提问于 2017-08-24 09:40:30
回答 1查看 1.5K关注 0票数 2

当我尝试打开通知后连接ble时,但通常返回BleGattException status = 133,有时它不会。

这是我的密码:

代码语言:javascript
复制
    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

这是我的评论后面的打印日志//:

代码语言:javascript
复制
   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(假)

代码语言:javascript
复制
   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

代码语言:javascript
复制
   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() 

连接失败关贸总协定接近

代码语言:javascript
复制
   08-22 14:12:02.997 31399-31399/com.evan.yeeuusample D/BluetoothGatt: unregisterApp() - mClientIf=5

继续尝试连接:

代码语言:javascript
复制
   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,关贸总协定已经关闭!现在这种情况经常发生,帮我谢谢你。

BleGattException状态返回133

EN

回答 1

Stack Overflow用户

发布于 2017-08-29 07:29:24

请使用nRF连接应用程序测试您的设备:https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp

如果该应用程序可以连接到您的设备,我认为问题的rxble。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45858151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档