通过小程序添加的descriptors都是无法识别, 导致连接后notifyBLECharacteristicValueChange报错, 10008 错误为no descriptor
const service = {
uuid: data.UUID_SERVICE,
characteristics: [{
uuid: data.UUID_CHARACTERISTIC_READ,
properties: {
read: false,
write: false,
notify: true,
indicate: false
},
permission: {
readable: true,
writeable: true,
readEncryptionRequired:false,
writeEncryptionRequired:false
},
value: util.hexToArray("2902").buffer,
descriptors: [{
uuid: data.UUID_CHARACTERISTIC_READ,
permission: {
write: true,
read: true
},
value: util.hexToArray("2902").buffer
}]
}]
}
正常的ble设备截图如下:
请问博主,你的问题解决了吗?我也遇到这个问题,添加服务的时候 。iOS 会提示fail One or more parameters were invalid