hashtagchris / DotNet-BlueZ

A quick and dirty library for BlueZ's D-Bus APIs. Focus is on Bluetooth Low Energy APIs.
Apache License 2.0
103 stars 37 forks source link

Write to characteristic with response? #18

Open hansmbakker opened 3 years ago

hansmbakker commented 3 years ago

I see that in the WriteValueAsync method you can pass an options dictionary to write the value and await a response.

The required options dictionary should contain type = request for that (my reference is https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt#n99)

How can I read the response / see whether the write was succesful? The WriteValueAsync task does not return a value directly.

Caffiendish commented 2 years ago

It's a bit late, but I've been having some of the same issues, which I talked about here: https://github.com/hashtagchris/DotNet-BlueZ/issues/8#issuecomment-991858139

Maybe something there can help with your project?