Android10蓝牙5.0连接成功后几秒后会自动断开

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:24 2507 0 全屏看文

AI助手支持GPT4.0

Android10蓝牙5.0连接成功后几秒后会自动断开
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.createBLEConnection 微信安卓客户端 7.0.17 2.12.0

1.首先调用了wx.openBluetoothAdapter初始化成功后

2.调用wx.onBLEConnectionStateChange 开启监听

3.搜索到设备后调用wx.createBLEConnection连接设备

4.连接成功后过几秒就自动断开了

其它手机 蓝牙4.0的没有出现该问题,怀疑和蓝牙5.0有关


Framework type problem type API / component name terminal type wechat version basic library version applet bug wx.createBLEConnection Wechat Android client 7.0.17 2.12.0 1 wx.openBluetoothAdapter After successful initialization, 2 wx.onBLEConnectionStateChange Turn on monitor 3. after searching for device. wx.createBLEConnection Connecting devices 4. After a few seconds of successful connection, other mobile phones will be disconnected automatically. Bluetooth 4.0 does not have this problem. It is suspected that it is related to Bluetooth 5.0

回答:

社区技术运营专员-灵芝:

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

另外,提供appid,复现问题后请在手机微信上传日志: 我->设置->帮助与反馈右上角有个上报日志的入口,提供出现问题的微信号,出现问题的时间点(具体到分钟)

-EOF-

AI助手支持GPT4.0