I'm trying to use bluez's gatttool to write to some demo characteristics on a BLE custom board. Specifically I'm hoping to write to a characteristic and read the value back out. Here's what I'm doing (where 0x25 is the handle for the characteristic):
bluepy$ gatttool -b EC:24:B8:23:1C:39 -I
[ ][EC:24:B8:23:1C:39][LE]> connect
[CON][EC:24:B8:23:1C:39][LE]> char-read-hnd 0x0025
[CON][EC:24:B8:23:1C:39][LE]> Characteristic value/descriptor: 01
[CON][EC:24:B8:23:1C:39][LE]> char-write-cmd 0x25 0x02
[CON][EC:24:B8:23:1C:39][LE]> char-read-hnd 0x0025
[CON][EC:24:B8:23:1C:39][LE]> Characteristic value/descriptor: 00
Does anyone know why the characteristic value read is 00 rather than 02 (second argument of char-write-cmd
)?
Any help will be appreciated.