Re: GattCharacteristic1 WriteValue fails parameter validation in a GATT Client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

On Fri, Jul 29, 2022 at 1:48 PM John Klug <John.Klug@xxxxxxxxxxxxx> wrote:
>
> I see this is in the example-gatt-server, but not in a client.  Does anyone have this in an example?  Ideally written in C or C++ with libgio.
>
> My issue is that the parameter list is rejected when I use libgio:
>
> Error message: Method "WriteValue" with signature "aya{sv}" on interface "org.bluez.GattCharacteristic1" doesn't exist

This is for a GATT Server, application implements WriteValue, or for
GATT client, bluetoothd implementation of WriteValue? In case of the
later you need to check if you are generating the message with the
right signature, for instance this is how we construct the WriteValue
parameters on bluetoothctl:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/client/gatt.c#n714

> Turning on bluetoothd  -d, I am not seeing this error.  I see my service appear.  gdbus introspection shows the interface and the WriteValue method, but the call to WriteValue does not seem to generate any debug output in bluetoothd.
>
> I wrote this up in https://discourse.gnome.org/t/how-does-one-find-the-valid-signatures-in-d-bus-for-an-interface-method/10579/6
>
> I have tried both Ubuntu 20.04 on a PC, and on an ARM 32bit processor I have tried Linux 5.4.199 with BlueZ 5.64.
>
> How does one write to a gatt characteristic in a client if one is not to use WriteValue?

You can use AcquireWrite and then write directly to the fd received.

-- 
Luiz Augusto von Dentz



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux