uniapp蓝牙getBLEDeviceServices接口获取不了服务问题
问题:使用onBLEConnectionStateChange监听设备连接成功后调用getBLEDeviceServices任报错no device。解决方案:使用setTimeout定时1秒。
·
问题:使用onBLEConnectionStateChange监听设备连接成功后调用getBLEDeviceServices任报错no device
解决方案:使用setTimeout定时1秒
setTimeout(() => { uni.getBLEDeviceServices({ deviceId: '设备id', success(res) { console.log('服务成功', res); }, fail(err) { console.log('服务失败', err); } }); }, 1000);
更多推荐
已为社区贡献1条内容
所有评论(0)