问题现象:
我们这边发现使用微信连接低功耗蓝牙设备,获取蓝牙设备特征值时写入属性为true。
但是我们自己开发的app应用获取的蓝牙设备特征值写入属性为false。
上面这个api。
疑问:
这边想咨询一下,微信在原生测的写入属性获取和写入类型是用的一下哪种类型。
写入属性:
@constant CBCharacteristicPropertyWriteWithoutResponse Permits writes of the characteristic value, without a response.
@constant CBCharacteristicPropertyWrite Permits writes of the characteristic value.
写入类型:
CBCharacteristicWriteWithResponse = 0,
CBCharacteristicWriteWithoutResponse,
你好,如果特征值带有CBCharacteristicPropertyWrite或者CBCharacteristicPropertyWriteWithoutResponse属性就会返回write:true
写入时,先特征值是否带有CBCharacteristicPropertyWrite属性,若有则使用CBCharacteristicWriteWithResponse写入;如果没有,再判断是否带有CBCharacteristicPropertyWriteWithoutResponse属性,若有则用CBCharacteristicWriteWithoutResponse进行写入;如果也没有,则返回10007错误码(property not support)