tinyb icon indicating copy to clipboard operation
tinyb copied to clipboard

WriteValue by handle

Open yongnan0809 opened this issue 8 years ago • 1 comments
trafficstars

Hello. TinyB library support write value by UUID. But in my case one UUID hava many handle and value.

[CC:78:AB:6C:97:00][LE]> char-read-uuid 00002902-0000-1000-8000-00805f handle: 0x001f value: 00 00 handle: 0x0025 value: 00 00 handle: 0x002f value: 00 00 handle: 0x003a value: 00 00 handle: 0x004b value: 00 00

So I can't send someting like BluetoothGattService Service = sensor.find("Service UUID"); BluetoothGattCharacteristic config=Service.find("Characteristic UUID"); config.writeValue((byte)0x01);

so the tinyB library can send byte by handle ?? Like BluetoothGattCharacteristic config=Service.find("Handle"); Thankyou.

yongnan0809 avatar Feb 26 '17 13:02 yongnan0809

Not entirely sure how this works. I think you might need to write that value at an offset inside the array. This is currently not supported but not difficult to add. Best would be to ask the BlueZ maintainers about this. http://www.bluez.org/contact/

petreeftime avatar Jun 10 '17 10:06 petreeftime