some debugging, notes on BT protocol
[pulsecounter.git] / NOTES
1 Anaren boosterpach with Emmoco firmware looks like this over BLE:
2
3 [BC:6A:29:AB:2E:31][LE]> primary
4 attr handle: 0x0001, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb
5 attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb
6 attr handle: 0x0010, end grp handle: 0xffff uuid: 0000ffe0-0000-1000-8000-00805f9b34fb
7
8 # 1800: Generic Access
9 [BC:6A:29:AB:2E:31][LE]> characteristics 1 0x0b
10 # 2a00: Device Name
11 handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
12 # 2a01: Appearance
13 handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
14 # 2a02: Peripheral Privacy Flag
15 handle: 0x0006, char properties: 0x02, char value handle: 0x0007, uuid: 00002a02-0000-1000-8000-00805f9b34fb
16 # 2a03: Reconnection Address
17 handle: 0x0008, char properties: 0x0a, char value handle: 0x0009, uuid: 00002a03-0000-1000-8000-00805f9b34fb
18 # 2a04: Peripheral Preferred Connection Parameters
19 handle: 0x000a, char properties: 0x02, char value handle: 0x000b, uuid: 00002a04-0000-1000-8000-00805f9b34fb
20 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x01
21 Characteristic value/descriptor: 00 18
22 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x02
23 Characteristic value/descriptor: 02 03 00 00 2a 
24 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x03
25 Characteristic value/descriptor: 
26 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x04
27 Characteristic value/descriptor: 02 05 00 01 2a 
28 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x05
29 Characteristic value/descriptor: 00 00 
30 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x06
31 Characteristic value/descriptor: 02 07 00 02 2a 
32 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x07
33 Characteristic value/descriptor: 00 
34 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x08
35 Characteristic value/descriptor: 0a 09 00 03 2a 
36 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x09
37 Characteristic value/descriptor: 00 00 00 00 00 00 
38 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x0a
39 Characteristic value/descriptor: 02 0b 00 04 2a 
40 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x0b
41 Characteristic value/descriptor: 50 00 a0 00 00 00 e8 03 
42
43 # 1801: Generic Attribute
44 [BC:6A:29:AB:2E:31][LE]> characteristics 0x0c 0x0f
45 handle: 0x000d, char properties: 0x20, char value handle: 0x000e, uuid: 00002a05-0000-1000-8000-00805f9b34fb
46 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x0c
47 Characteristic value/descriptor: 01 18 
48 # 2a05: Service Changed (Indicate)
49 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x0d
50 Characteristic value/descriptor: 20 0e 00 05 2a
51 # uint16: Start of Affected Attribute Handle Range
52 # uint16: End of Affected Attribute Handle Range
53 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x0e
54 Error: Characteristic value/descriptor read failed: Attribute can't be read
55 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x0f
56 Characteristic value/descriptor: 00 00 
57
58 [BC:6A:29:AB:2E:31][LE]> characteristics 0x10
59 handle: 0x0011, char properties: 0x12, char value handle: 0x0012, uuid: 0000ffe1-0000-1000-8000-00805f9b34fb
60 handle: 0x0014, char properties: 0x12, char value handle: 0x0015, uuid: 0000ffe2-0000-1000-8000-00805f9b34fb
61 handle: 0x0017, char properties: 0x0c, char value handle: 0x0018, uuid: 0000ffe3-0000-1000-8000-00805f9b34fb
62 handle: 0x0019, char properties: 0x0c, char value handle: 0x001a, uuid: 0000ffe4-0000-1000-8000-00805f9b34fb
63 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x10
64 Characteristic value/descriptor: e0 ff 
65 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x11
66 Characteristic value/descriptor: 12 12 00 e1 ff 
67 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x12
68 Error: Characteristic value/descriptor read failed: Request attribute has encountered an unlikely error
69 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x13
70 Characteristic value/descriptor: 
71 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x14
72 Characteristic value/descriptor: 
73 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x15
74 Characteristic value/descriptor: 
75 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x16
76 Characteristic value/descriptor: 
77 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x17
78 Characteristic value/descriptor: 
79 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x18
80 Error: Characteristic value/descriptor read failed: Attribute can't be read
81 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x19
82 Characteristic value/descriptor: 
83 [BC:6A:29:AB:2E:31][LE]> char-read-hnd 0x1a
84 Error: Characteristic value/descriptor read failed: Attribute can't be read
85
86 =============
87
88 [BC:6A:29:AB:2E:31][LE]> primary ffe0
89 Starting handle: 0x0010 Ending handle: 0xffff
90
91 [BC:6A:29:AB:2E:31][LE]> characteristics 0x0010 0xffff
92 handle: 0x0011, char properties: 0x12, char value handle: 0x0012, uuid: 0000ffe1-0000-1000-8000-00805f9b34fb
93 handle: 0x0014, char properties: 0x12, char value handle: 0x0015, uuid: 0000ffe2-0000-1000-8000-00805f9b34fb
94 handle: 0x0017, char properties: 0x0c, char value handle: 0x0018, uuid: 0000ffe3-0000-1000-8000-00805f9b34fb
95 handle: 0x0019, char properties: 0x0c, char value handle: 0x001a, uuid: 0000ffe4-0000-1000-8000-00805f9b34fb
96
97 [BC:6A:29:AB:2E:31][LE]> char-desc 0x0010 0xffff
98 handle: 0x0010, uuid: 00002800-0000-1000-8000-00805f9b34fb      * GATT Primary Service Declaration
99 handle: 0x0011, uuid: 00002803-0000-1000-8000-00805f9b34fb      + GATT Characteristic Declaration
100 handle: 0x0012, uuid: 0000ffe1-0000-1000-8000-00805f9b34fb
101 handle: 0x0013, uuid: 00002902-0000-1000-8000-00805f9b34fb      + Client Characteristic Configuration
102 handle: 0x0014, uuid: 00002803-0000-1000-8000-00805f9b34fb      + GATT Characteristic Declaration
103 handle: 0x0015, uuid: 0000ffe2-0000-1000-8000-00805f9b34fb
104 handle: 0x0016, uuid: 00002902-0000-1000-8000-00805f9b34fb      + Client Characteristic Configuration
105 handle: 0x0017, uuid: 00002803-0000-1000-8000-00805f9b34fb      + GATT Characteristic Declaration
106 handle: 0x0018, uuid: 0000ffe3-0000-1000-8000-00805f9b34fb
107 handle: 0x0019, uuid: 00002803-0000-1000-8000-00805f9b34fb      + GATT Characteristic Declaration
108 handle: 0x001a, uuid: 0000ffe4-0000-1000-8000-00805f9b34fb
109
110