收藏
回答

蓝牙writeBLECharacteristicValue 报10002?

    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异常

回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签