You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|0x34-0x35|Device type as a little-endian 16 bit integer (see device type mapping)|
64
-
|0x3a-0x40|MAC address of the target device|
65
+
|0x3a-0x3f|MAC address of the target device|
65
66
66
67
Device type mapping:
67
68
@@ -107,20 +108,19 @@ The command packet header is 56 bytes long with the following format:
107
108
|0x08-0x1f|00|
108
109
|0x20-0x21|Checksum of full packet as a little-endian 16 bit integer|
109
110
|0x22-0x23|00|
110
-
|0x24|0x2a|
111
-
|0x25|0x27|
111
+
|0x24-0x25|Device type as a little-endian 16 bit integer|
112
112
|0x26-0x27|Command code as a little-endian 16 bit integer|
113
113
|0x28-0x29|Packet count as a little-endian 16 bit integer|
114
114
|0x2a-0x2f|Local MAC address|
115
115
|0x30-0x33|Local device ID (obtained during authentication, 00 before authentication)|
116
-
|0x34-0x35|Checksum of packet header as a little-endian 16 bit integer
116
+
|0x34-0x35|Checksum of unencrypted payload as a little-endian 16 bit integer
117
117
|0x36-0x37|00|
118
118
119
-
The payload is appended immediately after this. The checksum at 0x34 is calculated *before* the payload is appended, and covers only the header. The checksum at 0x20 is calculated *after* the payload is appended, and covers the entire packet (including the checksum at 0x34). Therefore:
119
+
The payload is appended immediately after this. The checksum at 0x20 is calculated *after* the payload is appended, and covers the entire packet (including the checksum at 0x34). Therefore:
120
120
121
121
1. Generate packet header with checksum values set to 0
122
-
2. Set the checksum initialisation value to 0xbeaf and calculate the checksum of the packet header. Set 0x34-0x35 to this value.
123
-
3.Append the payload
122
+
2. Set the checksum initialisation value to 0xbeaf and calculate the checksum of the unencrypted payload. Set 0x34-0x35 to this value.
123
+
3.Encrypt and append the payload
124
124
4. Set the checksum initialisation value to 0xbeaf and calculate the checksum of the entire packet. Set 0x20-0x21 to this value.
125
125
126
126
Authorisation
@@ -180,7 +180,7 @@ Send the following payload with a command byte of 0x006a
180
180
|0x04|0x26 = IR, 0xb2 for RF 433Mhz, 0xd7 for RF 315Mhz|
181
181
|0x05|repeat count, (0 = no repeat, 1 send twice, .....)|
182
182
|0x06-0x07|Length of the following data in little endian|
183
-
|0x08 ....|Pulse lengths in 32,84ms units (ms * 269 / 8192 works very well)|
183
+
|0x08 ....|Pulse lengths in 2^-15 s units (µs * 269 / 8192 works very well)|
184
184
|....|0x0d 0x05 at the end for IR only|
185
185
186
186
Each value is represented by one byte. If the length exceeds one byte
0 commit comments