测试低功耗蓝牙时一直报错
检查后发现
wx.writeBLECharacteristicValue({
deviceId: this._deviceId,
serviceId: this._deviceId,
characteristicId: this._characteristicId,
value: buffer,
})
其中的`serviceId`写成了`_deviceId`
修改后
wx.writeBLECharacteristicValue({
deviceId: this._deviceId,
serviceId: this._serviceId,
characteristicId: this._characteristicId,
value: buffer,
})
你好,反馈已收到。
https://developers.weixin.qq.com/miniprogram/dev/framework/device/bluetooth.html
代码在页面底部