writeBLE(buffer) {
let that = this;
var uint8Buf = that.sr2ab(buffer);
wx.writeBLECharacteristicValue({
deviceId: this._deviceId,
serviceId: this._serviceId,
characteristicId: this._characteristicId,
value: uint8Buf,
success(res) {
// console.log(res, 'resres');
},
fail: function (res) {
console.log(res, 'fail');
that.blueFalid('Wi-Fi名称或者密码输入错误!')
}
})
}
通过setInterVal每5秒调用一次,过一会儿会报这个错误。
需要初始化蓝牙适配器