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

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

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

参考资料:

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

Keil  error C272: '__asm' requires src-control to be active 解决办法

Keil error C272: '__asm' requires src-control to be active 解决办法

问题: 在C代码里加入了__asm语句,例如“__asm POP 7”,编译出现Error error C272: '__asm' requires src-control to be active 解决办法: 右键选中该文件----option for file"...

CC2541功耗测试结果

CC2541功耗测试结果

测试环境: 1、CC2541开发板 2、使用heartrate工程,修改心率发送间隔时间为1秒(原来是2秒) 测试结果: 慢速广播 10 uA 快速广播 2 mA 仅定时器运行:1.2 uA(蓝牙关闭) 休眠:0.34 uA 与手机连接时刻:1 mA 约持续10秒 保持连接状态(1秒发送一次心率值...

sqlserver查询数据的所有表名和行数

https://www.cnblogs.com/luxj/p/9227385.html //查询所有表名select name from sysobjects where xtype='u' select * from sys.tables //查询数据库中所有的表名及行数 SELECT a....

windows xp系统添加凭据操作方法

windows xp系统添加凭据操作方法

Windows XP操作系统中打开“运行”,输入“ control keymgr.dll”回车,即可打开“存储用户名和密码”窗口,单击“高级”选项卡,然后单击“管理密码”,添加服务器的IP地址、用户和密码,确认退出后,重启电脑。...

php Undefined index和Undefined variable的解决方法

参考资料:http://www.jb51.net/article/13974.htm 问题: 上传一个PHP网站到服务器,提示: PHP Notice: Undefined index: user in C:\inetpub\wwwroot\xonixwatch.com\manager\index....

Win7 64bit安装keyshot 0xc000007b 错误解决

 先放出keysho 3.2.36的下载地址: 32bit:http://download.keyshot.com/keyshot_w32_3.2.36.exe 64bit:http://download.keyshot.com/keyshot_w64_3.2.36.exe 和谐包下载:...

发表评论

访客

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