收藏
回答

指南=>硬件能力=>蓝牙 示例代码(demo)代码有误!!!

https://developers.weixin.qq.com/miniprogram/dev/api/device/bluetooth-ble/wx.writeBLECharacteristicValue.html

蓝牙模块示例代码(demo)代码有误,wx.writeBLECharacteristicValue(Object object) 报错10004!!!

解决方法:如下 serviceId: this._deviceId, 改为serviceId: this._serviceId


wx.writeBLECharacteristicValue({
      deviceId: this._deviceId,
      serviceId: this._serviceId,
      characteristicId: this._characteristicId,
      value: buffer,
      success (res) {
        console.log('writeBLECharacteristicValue success', res.errMsg)
      }
    })
回答关注问题邀请回答
收藏

1 个回答

  • Riven.
    Riven.
    2021-08-02

    你好,反馈已收到,我们核实下。

    2021-08-02
    有用
    回复
登录 后发表内容