Closed tilersmyth closed 1 year ago
Hi. To confirm you're trying to implement a write followed by some kind of callback? Are you looking for something analogous to Bleno? A WRITE | READ won't do this on it's own- the read also needs triggering by the client. You could probably do this with a WRITE | NOTIFY though your client will need to subscribe to the characteristic.
Alternatively you might want a RELIABLE_WRITE but to be honest I'm not sure if that uses read or not. It's possible it might use the value property on the the characteristic interface though I think it's probably handled lower down the protocol stack. I will try and investigate this more thoroughly at some point.
My gatt client sends a write request that is looking for a response and I'm using something like the following code:
Shouldn't this work? The write part works but nothing is returned. I'm sure I'm missing something but I've been racking my brain trying to figure this out and I couldn't find an example to handle this scenario. thanks for any help.