writevalue, and the cached value

I recently filed a spec issue that writevalue should not update value
<https://github.com/WebBluetoothCG/web-bluetooth/issues/277>, and am
looking for any community thoughts / objections.

Chromium's internal Bluetooth abstraction layer considered
<https://bugs.chromium.org/p/chromium/issues/detail?id=614534> caching the
value, and we decided that it is not the right thing to do.

Peripheral devices may take any action they please upon a write event. A
characteristic that reports a value may accept writes as well that do not
actually 'set' a value that would later be returned by a read.

I don't have a complete example on hand, but the heart rate service is a
concrete partial example. It contains a characteristic heart rate control
point
<https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.heart_rate_control_point.xml>
which
accepts writes to cause the peripheral to reset an internal variable. All
writes to that point will be of the value '1'. It would not make sense to
cache that value for reading.

Received on Tuesday, 30 August 2016 00:09:37 UTC