当前位置:首页 > 技术心得 > 正文内容

android bluetoothGatt :onClientRegistered() - status=133 clientIf=0

xjtudll11年前 (2015-12-04)技术心得47390

参考资料:

http://stackoverflow.com/questions/25330938/android-bluetoothgatt-status-133-register-callback

http://stackoverflow.com/questions/28894111/android-ble-gatt-error133-on-connecting-to-device

问题:

BLE连接时(使用 .connectGatt),不是提示成功或失败,而是提示:

BluetoothGatt(32027): onClientRegistered() - status=133 clientIf=0

经查:

133 = 0x85,是GATT_ERROR

d7ccbb9d-5577-4e08-a98f-4e8a747e5075

错误含义

https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/android-4.4.4_r2.0.1/stack/include/gatt_api.h

原因:

之前断开连接时,仅仅是调用了.disconnect(), 而没有调用.close().

BluetoothGatt一次最多只能处理6个连接(android4.4)。所以重复连接6次之后,就再也无法连接了。

解决办法:

每次重连前,BluetoothGat先调用.close(),这样可以释放所有的连接。

扫描二维码推送至手机访问。

版权声明:本文由鸟的天空发布,如需转载请注明出处。

本文链接:http://xjtudll.cn/Exp/375/

标签: AndroidBLE
分享给朋友:

“android bluetoothGatt :onClientRegistered() - status=133 clientIf=0” 的相关文章

ios:autolayout下如何获取UIView的实际宽度

参考资料: http://stackoverflow.com/questions/27653247/how-to-get-real-size-uiview-with-autolayout 问题: 在storyboard里放了一个UIView,并使用autolayout来约束其宽度。为了获取其实际宽度...

C# 用NPOI操作读写2007版的excel错误

现象: 导出Excel2003正常,导出Excel2007莫名其妙的错误。 C#用NPOI操作读写类网上很多了,在此不重复。 我引用的dll:NPOI.dll,NPOI.OOXML.dll,NPOI.OpenXml4Net.dll, 解决方法:还需要引用ICSharpCode.SharpZipLib...

老单单据上下查,某些字段在上下查出来的界面看不到

https://vip.kingdee.com/questions/55600564193023233/answers/55600565182629120 问题描述: 例如:将外购入库上的【保管】字段显示在序时簿界面,但是在采购发票序时簿上查外购入库单的界面看不到【保管】,查询起来不方便。 解决方案...

浅析电波表——德国DCF码

浅析电波表——德国DCF码

参考文献:   http://en.wikipedia.org/wiki/DCF77 http://www.ptb.de/en/publikationen/news/html/news032/artikel/03207.htm http://www.ptb.de/cms/index.php...

SQL Server配置网络路径

远程数据库服务器名:ChenCunServer @@servername:ChenCunServer 现在需要在此机上新建发布。在第三步中,指定快照文件夹。默认是:D:\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData...

C#让TextBox滚动条一直位于最下部

TextChanged事件 滚动条自动处于TextBox最下部需要在Form1类中加上下段代码:   private void txtReceiveMsgChanged(object sender, EventArgs e) {     //...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。