-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathUSB notes.txt
78 lines (46 loc) · 2.64 KB
/
USB notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Document conventions:
numbering starts from 0
ALL COMMANDS:
Always starts with 0x55
Snippet from PuTTY log:
81[32]: 55 01 15 6b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 16 01 1e 01 ff 00 18 01 1e 01 ff 00 18 01 1e 01 ff 00 18 ea 00 00 00 00 00 00 00 00 00
81[32]: 55 01 16 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 17 01 1e 01 ff 00 00 01 1e 01 ff 00 00 01 1e 01 ff 00 00 a3 00 00 00 00 00 00 00 00 00
81[32]: 55 01 17 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 18 01 1e 01 ff 6e 00 01 1e 01 ff 6e 00 01 1e 01 ff 6e 00 ee 00 00 00 00 00 00 00 00 00
81[32]: 55 01 18 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 19 01 1e 01 00 6e 00 01 1e 01 00 6e 00 01 1e 01 00 6e 00 f2 00 00 00 00 00 00 00 00 00
EP 01:
01[32]: 55 14 c6 16 01 1e 01 ff 00 18 01 1e 01 ff 00 18 01 1e 01 ff 00 18 ea 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 17 01 1e 01 ff 00 00 01 1e 01 ff 00 00 01 1e 01 ff 00 00 a3 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 18 01 1e 01 ff 6e 00 01 1e 01 ff 6e 00 01 1e 01 ff 6e 00 ee 00 00 00 00 00 00 00 00 00
01[32]: 55 14 c6 19 01 1e 01 00 6e 00 01 1e 01 00 6e 00 01 1e 01 00 6e 00 f2 00 00 00 00 00 00 00 00 00
Byte 0 always 0x55
Byte 1 always 0x14
Byte 2 always 0xc6
Byte 3 looks like a counter, changing it breaks the command though (Probably due to checksum)
Byte 4 always 01
Byte 5 always 1e
Byte 6 always 01
Byte 7 can change
Last non-zero byte is a checksum
Checksum byte:
Last non-zero byte is a checksum
Checksum is not:
CRC-8 Maxim/Dallas Algorithm https://gist.githubusercontent.com/eaydin/768a200c5d68b9bc66e7/raw/b759cc066973b59f5af276311addb455ed8e7ef5/crc8dallas.py
EP 81:
81[32]: 55 01 15 6b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
81[32]: 55 01 16 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
81[32]: 55 01 17 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
81[32]: 55 01 18 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Byte 0 always 0x55
Byte 1 always 0x01
Byte 2 looks like a counter
Byte 3 looks like a counter
HYPOTHESES:
Protocol will start with a handshake
Commands to change colour of pads will follow
Colour values will consist of 3 sets of 3 byte RGB values. ex. [(0x00,0x00,0xff), (0x00,0x00,0xff), (0x00,0x00,0xff)]
Colour values will persist until new values are sent or device is powered off.
Command specific notes: