labapart / gattlib

Library to access GATT information from BLE (Bluetooth Low Energy) devices
http://labapart.com/
461 stars 161 forks source link

example/read_write throws error Failed to write DBus GATT characteristic: GDBus.Error:org.bluez.Error.InvalidArguments: Invalid Length #176

Open utherp opened 4 years ago

utherp commented 4 years ago

I managed to circumvent this error by modifying the example thusly:

uint8_t val = value_data & 0xff; ret = gattlib_write_char_by_uuid(connection, &g_uuid, &val, sizeof(val));

...but this only writes one byte. I cannot write more than one byte without it throwing the error: GDBus.Error:org.bluez.Error.InvalidArguments: Invalid Length.

I have tried finding where the failure is to little avail. If this is a bug, I'm happy to fix it with a little direction. If it is my system, please advise:

arch: amd64 debian_version: 10.4 bluez version: 5.50-1.2~deb10u1

utherp commented 4 years ago

wow... close this. this was a problem with the device, not the library! sorry