let buffer = new ArrayBuffer(4)
let dataView = new DataView(buffer)
console.log(dataView)
dataView.setUint8(0, 0XFA)
dataView.setUint8(1, 0x01)
dataView.setUint8(2, 0x01)
dataView.setUint8(3, 0XAF)
wx.writeBLECharacteristicValue({
deviceId: this._serviceId,
serviceId: this._deviceId,
characteristicId: this._characteristicId,
value: buffer
})
返回10002异常
请参考https://developers.weixin.qq.com/miniprogram/dev/api/device/bluetooth-ble/wx.writeBLECharacteristicValue.html#%E6%B3%A8%E6%84%8F