wx.writeBLECharacteristicValue成功,但是打印机没反应?
var buffer = new ArrayBuffer(21)
var dataView = new DataView(buffer)
dataView.setUint8(0, 0)
wx.writeBLECharacteristicValue({
deviceId: app.BLEInformation.deviceId,
serviceId: app.BLEInformation.writeServiceId,
characteristicId: app.BLEInformation.writeCharaterId,
value: buffer,
success: function (res) {
console.log(‘写入成功’, res)
},
fail: function (e) {
console.fail(‘写入失败’, e)
},
complete: function () {
}
})
走success成功的回调
也提示ok了 但是打印机没反应,ps:打印机是Xpinter 型号:XP-N160II, 请官方人员给答复!