2***@qq.com
2***@qq.com
  • 发布:2024-05-30 09:43
  • 更新:2024-05-30 13:10
  • 阅读:318

安卓APP:手机获取蓝牙特征值,特征值write为true,使用写入功能uni.writeBLECharacteristicValue报10007

分类:HBuilderX

手机获取蓝牙特征值,特征值write为true,使用写入功能uni.writeBLECharacteristicValue报10007

特征值第二个write为true:{
"characteristics": [
{
"uuid": "0003CDD1-0000-1000-8000-00805F9B0131",
"properties": {
"read": false,
"write": false,
"notify": true,
"indicate": false
}
},
{
"uuid": "0003CDD2-0000-1000-8000-00805F9B0131",
"properties": {
"read": false,
"write": true,
"notify": false,
"indicate": false
}
}
],
"errMsg": "getBLEDeviceCharacteristics:ok"
}

写入功能报10007(当前特征值不支持此操作):
{
"errMsg": "writeBLECharacteristicValue:fail property not support",
"errCode": 10007,
"code": 10007
}

2024-05-30 09:43 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com (作者)

找到问题了,延迟一秒使用uni.writeBLECharacteristicValue就好了

  • 2***@qq.com

    感谢大佬就我狗命

    2024-07-01 14:45

  • 3***@qq.com

    感谢感谢,我这个分包成20字节也是要设延时,不然全是10007

    2024-10-17 14:31

要回复问题请先登录注册