writeBLECharacteristicValue调用ArrayBuffer
发布于 6 年前 作者 yyi 2240 次浏览 来自 问答

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 回复

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

回到顶部