收藏
回答

使用蓝牙能够发送数据成功,监听特征值变化时报10008错误?

API名称:wx.notifyBLECharacteristicValueChangeji
机型:各种机型,如华为nova7pro,iphone12pro
系统:EMUI10.1.1
微信号:qsqx19950205
时间:2020-11-4 11:50
报错内容:notifyBLECharacteristicValueChange:fail:no descriptor
代码片段:https://developers.weixin.qq.com/s/tQzdCBme7Oly
代码://@description 开启 notify
  openNotify:function() {
    let that = this
    wx.notifyBLECharacteristicValueChange({
      state: true,
      deviceId:that.data.deviceId,
      serviceId:that.data.serviceId,
      characteristicId:that.data.characteristicId,
      type: 'notification',
      complete(res) {
        console.log('notify 开启成功', res.errMsg)
        wx.showToast({
          title: '开启成功',
          icon:'success',
          duration:2000
        })
      }
    })
  },
用好几种手机测试过,问题必先,
Android错误:"notifyBLECharacteristicValueChange:fail:no descriptor"
IOS错误:"errMsg = The attribute could not be found."
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签