plus.bluetooth.notifyBLECharacteristicValueChange({
state: true,
deviceId: id, //通过搜索得到
serviceId: "0000FFE0-0000-1000-8000-00805F9BXXXX", //通过getBLEDeviceServices得到
characteristicId: "0000FFE1-0000-1000-8000-00805F9BXXXX", //通过getBLEDeviceCharacteristics得到
success: function(e) {
console.log('success: ' + JSON.stringify(e));
}, fail: function(e) {
console.log('error: ' + JSON.stringify(e));
}
});
结果:success: {"code":-1,"message":"error,Property unsupport Notify or Indicate"}
Android运行没问题返回success: {"code":0,"message":"ok"}
这是新版本的bug 刚刚试了旧版本 没有该问题
0 个回复