wx.onBLECharacteristicValueChange(function (characteristic) {
var creaddata = wx.arrayBufferToBase64(characteristic.value)
var v = characteristic;
console.log('creaddata:' + creaddata);
console.log(`characteristic ${characteristic.characteristicId} has changed, now is ${characteristic.value}`)
})
console.log(that.data.readServicweId);
console.log(that.data.readCharacteristicsId);
wx.readBLECharacteristicValue({
// 这里的 deviceId 需要在上面的 getBluetoothDevices 或 onBluetoothDeviceFound 接口中获取
deviceId: that.data.connectedDeviceId,
// 这里的 serviceId 需要在上面的 getBLEDeviceServices 接口中获取
serviceId: that.data.readServicweId,
// 这里的 characteristicId 需要在上面的 getBLEDeviceCharacteristics 接口中获取
characteristicId: that.data.readCharacteristicsId,
success: function (res) {
console.log('readBLECharacteristicValue:', res.errMsg);
}
})
characteristic.value 输出为000000000000000000,是什么情况,求解!!!
@官方
楼主问题解决了吗 碰到相同问题
楼主情况解决了没?
蓝牙通讯
wechatide://minicode/0AAN1WmI6dYg
麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问题