蓝牙小程序怎么发送中文。
inputValue为值。
var buffer = inputValue.buffer;
wx.writeBLECharacteristicValue({
deviceId: that.data.deviceId,
serviceId: that.data.serviceId,
characteristicId: that.data.characteristicId,
value: buffer,
success: function (res) {
console.log(res)
console.log('writeBLECharacteristicValue success===', res.errMsg)
},
fail:function(res){
console.log('写入失败')
}
})
这里会直接到写入失败。