wx.setBLEMTU报错 setBLEMTU:fail:internal error,手机1+ace2 pro
// 蓝牙MTU设置
setBLEMTU(deviceId) {
setTimeout(() => {
wx.setBLEMTU({
deviceId: deviceId,
mtu: 512,
success(res) {
console.log("mtu设置成功!ccccc", res);
//console.log(res);
},
fail(err) {
console.log("mtu设置失败:ccccc", err);
//console.log(err);
var ret = '{"code":1,"msg": "蓝牙MTU设置失败"}';
return ret;
},
})
}, 1000)
}
不管继续往下连接,然后弄个定时器一直设置就行了,参考这个https://blog.csdn.net/weixin_44705979/article/details/139321651?spm=1001.2014.3001.5501