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

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

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

参考资料:

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” 的相关文章

sharepoint 安装Office Web Applications 报错

sharepoint 安装Office Web Applications 报错,如下: 未能从程序集“Microsoft.Office.Excel.Server.MossHost, Version=14.0.0.0, Culture=neutral, PublicKeyToken=...

CodeBlocks安装error:can't find compiler executable in your ...

CodeBlocks安装error:can't find compiler executable in your ...

参考资料:http://blog.sina.com.cn/s/blog_5fea94370102vait.html 问题描述: 第一次安装CodeBlocks,安装到了D盘,非默认目录。打开过软件。后来操作失误,卸载了。 第二次安装CodeBlocks,安装在了默认盘C盘,安装后再次打开,提示找不到...

php环境如何测试是否配置成功

<?php phpinfo(); ?> 编写一个PHP文件(注意:是PHP文件,不是txt文件),里面内容如上。 浏览器里访问这个文件。如果能看到配置信息,表明PHP环境配置成功。...

清理金蝶用户异常登录信息SQL语句

重点:删除 t_userprofile 表中某用户的信息 1. 打开帐套管理,找到该帐套,备份帐套 备份完帐套后, ,选中该帐套,然后点属性,在帐套属性里复制数据库实体名 2.在电脑开始程序里打开查询分析器 直接点确定进入 在查询框里输入 use,然后将复制的数据库实体名粘贴其后面,中间要有空白,...

SVN项目库错误Unsupported FS format svn: Expected FS format between '1' and '4'; found format '6'

SVN项目库错误Unsupported FS format svn: Expected FS format between '1' and '4'; found format '6'

问题: 利用SVN Dump版本库,命令行老是一闪而过 bat文件代码如下: cd .. F:\SubversionDB\websoft\svnserver\svnadmin.exe dump F:\SubversionDB\svn_repo\OSAL_51/ > f:/1.dump 这个ba...

tenx(十速)TM87系列常用宏(一)

tenx(十速)TM87系列常用宏(一) 首先,定义一些寄存器,用于存储临时变量,定义R0到R7为70H~77H,方便LCD显示。定义如下:ORG 70HR0 DN 1R1 DN 1R2 DN 1R3 DN 1R4 DN 1R5 DN 1R6 DN 1R7 DN 1由于累加器AC和状态寄存...

发表评论

访客

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