writeBLECharacteristicValue调用ArrayBuffer

发布于 7 年前作者 yyi2363 次浏览最后编辑 7 年前来自 ask

let buffer = new ArrayBuffer(16)

let dataView = new DataView(buffer)

dataView.setUint8(0, 0x06)

dataView.setUint8(0, 0x01)

dataView.setUint8(0, 0x01)

dataView.setUint8(0, 0x01)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

dataView.setUint8(0, 0x00)

console.log(buffer)

这里console真机没有任何数据,开发者工具里面有相关数据

请问大神怎么解决

1 回复
pengjun
pengjun1 楼5 年前

楼主,这个问题解决了吗?