On Mon, 1 Aug 2022 at 17:11, John Klug <John.Klug@xxxxxxxxxxxxx> wrote: > > Luiz Augusto von Dentz writes: > > >You can use AcquireWrite and then write directly to the fd received. > > I tried AcquireWrite as you suggest. The result was "NotSupported". I > should mention that I have tried Nordic's NRF Connect on Android with > the same GATT Server, and it is able to write to this > UUID/characteristic just fine. > > > Using "dbus-monitor --system" I see both read and write flags on my characteristic "service0021/char0046" with the correct UUID: > > > signal time=1659368288.691466 sender=:1.3649 -> destination=(null > destination) serial=968 path=/; > interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded > > object path "/org/bluez/hci0/dev_CC_F9_57_89_8B_D8/service0021/char0046" > array [ > dict entry( > string "org.freedesktop.DBus.Introspectable" > array [ > ] > ) > dict entry( > string "org.bluez.GattCharacteristic1" > array [ > dict entry( > string "UUID" > variant string "edf50100-681e-4b92-999c-e16b3a8bc047" > ) > dict entry( > string "Service" > variant object path "/org/bluez/hci0/dev_CC_F9_57_89_8B_D8/service0021" > ) > dict entry( > string "Value" > variant array [ > ] > ) > dict entry( > string "Flags" > variant array [ > string "read" > string "write" > ] > ) > ] > ) > dict entry( > string "org.freedesktop.DBus.Properties" > array [ > ] > ) > ] > > > > However, AcquireWrite replies with "Not Supported" which is the text I see in the error message in my program: > > > method call time=1659368290.693590 sender=:1.3987 -> > destination=org.bluez serial=10 > path=/org/bluez/hci0/dev_CC_F9_57_89_8B_D8/service0021/char0046; > interface=org.bluez.GattCharacteristic1; member=AcquireWrite > > array [ > ] > error time=1659368290.693700 sender=:1.3649 -> destination=:1.3987 error_name=org.bluez.Error.NotSupported reply_serial=10 > string "Operation is not supported" > > Any ideas on where in the BlueZ source I could look for this? Does anyone have an example of doing a GATT Write from a client? I have a watch companion application called Amazfish which does a lot of writing using the DBUS api. I wrote a simple Qt style wrapper around the dbus part which is at https://github.com/piggz/qble , and the app is at https://github.com/piggz/harbour-amazfish . Perhaps something in there will help you. Adam > > > > John Klug