解决了吗
saveFile 在ios系统上报错 fail it is not a tempFilePath?我canvas生成的临时图片想要保存到本地,在安卓上面没有问题,但是在iso系统上提示。 目前saveFIle穿的下载地址也是本地路径 代码也没有发现问题 异步同步save都是这个问题 这个该怎么解决,比较着急 [图片] [图片]
11-18真没有人管
wx.createBLEConnection连接不稳定,报错status 133?环境手机型号vivo x80 Android 13 微信版本:8.0.40 基础库:3.0.2 蓝牙板:是自己定制的,使用的芯片是WH-BLE102 U1.1 在iOS 微信版本8.0.39上连接大概是10次2次连接不上。升级到8.0.42基本上10次2次连接上。 2.连接开发的蓝牙板,连接非常不稳定,大概10次连接有2次成功,其他都报连接错误,status 133. 我尝试了你们提供的蓝牙BLE Sample代码,也是一样的现象。每次连接后都会关闭BLE连接和Adapter. 请问如何调试,确认问题点? connectBLE(name, deviceId) { const that = this; wx.createBLEConnection({ deviceId: deviceId, success: (res) => { console.log("[wiggle]start BLE connection OK ", res); const mtu = 100; wx.setBLEMTU({ deviceId: deviceId, mtu, success: (res) => { console.log("setBLEMTU success>>", res) }, fail: (res) => { console.log("setBLEMTU fail>>", res) } }), //开始监听蓝牙状态 that.getBLEDeviceServices(deviceId); that.setConnectedDeviceInfo2GlobalData(name, deviceId); that.setGlobal2LocalData(); wx.hideLoading(); wx.showToast({ title: '连接成功', mask: true, duration: 1000, }); wx.onBLEConnectionStateChange((res) => { console.log("onBLEConnectionStateChange res=", res); if((res.connected === false)&&(res.deviceId === getApp().globalData.deviceId)){ console.log("onBLEConnectionStateChange reset connected device!" ); that.clearConnectedDeviceGlobalData(); that.clearLocalDeviceConnectedData(); } }); }, fail: (res) => { wx.hideLoading(); console.log("[wiggle]start BLE connection falied **** ", res); if (res.errCode === -1) { wx.showToast({ title: "已经连接", mask: true, }); setConnectedDeviceInfo2GlobalData(name, devcieId); } else { that.showErrMessage(res.errCode); } }, }); console.log("[wiggle][tapEventCreateBLEConnection]end"); }, 3.wx.writeBLECharacteristicValue写入是成功的,但是写入7个数据,只有1个数据可以获取到是写入的。间隔时间从50毫秒,1秒,2秒都试过。 setTimeout(() => { this.createSpeedCmdBuffer(); }, 1000); createSpeedCmdBuffer() { let speed = this.data.speed * 1000; let temp = speed.toString(16); console.log("[wiggler]createSpeedCmdBuffer = ", util.formatTime(new Date()), temp, speed); let buffer = util.stringHex2SpecialBuffer(temp, 0x88, 0x88); // console.log("[wiggler]createSpeedCmdBuffer = ", util.ab2Array(buffer)); let deviceId = this.data.deviceId; let serviceId= this.data.serviceId; let uuid = this.data.writeUUID[0]; wx.writeBLECharacteristicValue({ deviceId: deviceId, serviceId: serviceId, characteristicId: uuid, writeType:"write", value: buffer, success: (res) => { console.log("[wiggle]createSpeedCmdBuffer 1-OK res = ", res); }, fail: (res) => { console.log("[wiggle]createSpeedCmdBuffer 2-fail res = ", res); }, complete: (res) => { // console.log("[wiggle]createSpeedCmdBuffer 3-complete res = ", res); } }); },
11-14解决了吗?
小程序连接低功耗蓝牙会自动断开,加了断线重连还是频繁断开?有什么办法能够优化为长连接不断开调用wx.createBLEConnection(Object object)成功连接低功耗蓝牙之后,老是会自动断开,断开的时间间隔分布随机,有时候是刚连接就断开,有时候间隔几十秒会断开,已经加了断线重连机制,但是还是会频繁断开,影响体验,问了我们的嵌入式,他说已经把蓝牙信号和频率加到最大了,监听接受蓝牙设备的广播包是一秒一次,他说小程序如果有增强连接信号的配置可能会生效,想问一问是有没有能够优化连接不断开的配置或者方法,微信版本号:8.0.45,基础库版本3.2.1
11-14