Hello
I'm trying to use bluez's gatttool to write to SimpleBLEPeripheral's characteristics. Specifically I'm hoping to write to characteristic 1 and read the value back out. Here's what I'm doing (where 0x25 is the handle for CHAR1):
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 is 00 rather than 02?
Also, isn't it that SBLEP only implements the simpleGATTProfile, which encapsulates just 5 characteristics (as per Figure 5-9 of the SW doc)? If I run the "characteristics" command in GATTTool, I get the following
[CON][EC:24:B8:23:1C:39][LE]> characteristics [CON][EC:24:B8:23:1C:39][LE]> handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb handle: 0x0006, char properties: 0x0a, char value handle: 0x0007, uuid: 00002a02-0000-1000-8000-00805f9b34fb handle: 0x0008, char properties: 0x08, char value handle: 0x0009, uuid: 00002a03-0000-1000-8000-00805f9b34fb handle: 0x000a, char properties: 0x02, char value handle: 0x000b, uuid: 00002a04-0000-1000-8000-00805f9b34fb handle: 0x000d, char properties: 0x20, char value handle: 0x000e, uuid: 00002a05-0000-1000-8000-00805f9b34fb handle: 0x0011, char properties: 0x02, char value handle: 0x0012, uuid: 00002a23-0000-1000-8000-00805f9b34fb handle: 0x0013, char properties: 0x02, char value handle: 0x0014, uuid: 00002a24-0000-1000-8000-00805f9b34fb handle: 0x0015, char properties: 0x02, char value handle: 0x0016, uuid: 00002a25-0000-1000-8000-00805f9b34fb handle: 0x0017, char properties: 0x02, char value handle: 0x0018, uuid: 00002a26-0000-1000-8000-00805f9b34fb handle: 0x0019, char properties: 0x02, char value handle: 0x001a, uuid: 00002a27-0000-1000-8000-00805f9b34fb handle: 0x001b, char properties: 0x02, char value handle: 0x001c, uuid: 00002a28-0000-1000-8000-00805f9b34fb handle: 0x001d, char properties: 0x02, char value handle: 0x001e, uuid: 00002a29-0000-1000-8000-00805f9b34fb handle: 0x001f, char properties: 0x02, char value handle: 0x0020, uuid: 00002a2a-0000-1000-8000-00805f9b34fb handle: 0x0021, char properties: 0x02, char value handle: 0x0022, uuid: 00002a50-0000-1000-8000-00805f9b34fb handle: 0x0024, char properties: 0x0a, char value handle: 0x0025, uuid: 0000fff1-0000-1000-8000-00805f9b34fb handle: 0x0027, char properties: 0x02, char value handle: 0x0028, uuid: 0000fff2-0000-1000-8000-00805f9b34fb handle: 0x002a, char properties: 0x08, char value handle: 0x002b, uuid: 0000fff3-0000-1000-8000-00805f9b34fb handle: 0x002d, char properties: 0x10, char value handle: 0x002e, uuid: 0000fff4-0000-1000-8000-00805f9b34fb handle: 0x0031, char properties: 0x02, char value handle: 0x0032, uuid: 0000fff5-0000-1000-8000-00805f9b34fb
which shows many more than 5 characteristics. With Characteristics Descriptor Discovery (char-desc), it gives
[CON][EC:24:B8:23:1C:39][LE]> char-desc [CON][EC:24:B8:23:1C:39][LE]> handle: 0x0001, uuid: 2800 handle: 0x0002, uuid: 2803 handle: 0x0003, uuid: 2a00 handle: 0x0004, uuid: 2803 handle: 0x0005, uuid: 2a01
rather than the 5 characteristics of simpleGATTProfile. Does anyone know why this is the case?
Thank you for the help in advance.