W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > August 2016

[web-bluetooth] Don't fire characteristicvaluechanged for Read Responses

From: Emill via GitHub <sysbot+gh@w3.org>
Date: Tue, 16 Aug 2016 14:45:02 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issues.opened-171433039-1471358700-sysbot+gh@w3.org>
Emill has just created a new issue for 

== Don't fire characteristicvaluechanged for Read Responses ==
Now characteristicvaluechanged is fired both for read responses and 
notifications. I don't think results of readValue should be sent to 
the characteristicvaluechanged event. It's better to just return the 
value in the promise. That makes it easier to write code that uses 
GATT reads, because you can then easier relate a read response to a 
particular read request.

Also, now as far as I can see, it's impossible to distinguish a 
characteristicvaluechanged that happened due to a read from one that 
happend due to a notification, which might be important when you want 
to implement something on top of GATT.

The term "characteristic value changed" also does not apply really to 
the read procedure; the value hasn't changed, you just got a copy of 
what's stored in the peripheral. For notifications however, the value 
has usually changed when a notification is sent.

Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/274 using your 
GitHub account
Received on Tuesday, 16 August 2016 14:45:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 August 2016 14:45:12 UTC