I'm using adafruit_ble to connect to an off-the-shelf BLE lamp that implements a custom protocol.
To do so, I've implemented a quick custom Service using StreamIn/Out characteristics.
In them, I specify Characteristic.WRITE_NO_RESPONSE. You can see the source code here.
However, the line states:
response=self.properties | Characteristic.WRITE
According to the documentation, response should be a bool where true means a reply is expected..
I may be mistaken, but OR seems to point as an "always true", while a AND would mean "only await a reply when config is specifically WRITE", hence I wonder if that should be a "&".
TLDR: I suspect there's an OR that should be an AND in _bleio.characteristic at line 195.
Hi folks,
I'm using adafruit_ble to connect to an off-the-shelf BLE lamp that implements a custom protocol.
To do so, I've implemented a quick custom Service using StreamIn/Out characteristics. In them, I specify Characteristic.WRITE_NO_RESPONSE. You can see the source code here.
However, at run time, the writing hangs waiting for a reply from the lamp. I tracked it down to _bleio.characteristic at line 195.
However, the line states: response=self.properties | Characteristic.WRITE
According to the documentation, response should be a bool where true means a reply is expected.. I may be mistaken, but OR seems to point as an "always true", while a AND would mean "only await a reply when config is specifically WRITE", hence I wonder if that should be a "&".