aboutsummaryrefslogtreecommitdiff
path: root/inform_protocol.md
diff options
context:
space:
mode:
Diffstat (limited to 'inform_protocol.md')
-rw-r--r--inform_protocol.md28
1 files changed, 15 insertions, 13 deletions
diff --git a/inform_protocol.md b/inform_protocol.md
index f06ddb3..f6f8a8b 100644
--- a/inform_protocol.md
+++ b/inform_protocol.md
@@ -19,20 +19,22 @@ continues until the controller sends the next noop response. Responses never
19appear to contain multiple commands. 19appear to contain multiple commands.
20 20
21## Raw Packet Structure 21## Raw Packet Structure
224 bytes magic number integer 22| Size | Purpose | Data Type |
234 bytes version integer 23| -------- | --------------------- | --------- |
246 bytes hwaddr string 24| 4 bytes | magic number | integer |
252 bytes flags short 25| 4 bytes | version | integer |
2616 bytes initialization vector string 26| 6 bytes | hwaddr | string |
274 bytes data version integer 27| 2 bytes | flags | short |
284 bytes data length integer 28| 16 bytes | initialization vector | string |
29n bytes AES encrypted payload string 29| 4 bytes | data version | integer |
30| 4 bytes | data length | integer |
31| n bytes | AES encrypted payload | string |
30 32
31## Raw Packet Constraints 33## Raw Packet Constraints
32magic must == 1414414933 34* magic must == `1414414933` (TNBU)
33data version must < 1 35* data version must < `1`
34flags & 0x1 != 0 means encrypted 36* `flags & 0x1 != 0` means encrypted
35flags & 0x2 != 0 means compressed 37* `flags & 0x2 != 0` means compressed
36 38
37## Payload Types 39## Payload Types
38The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the 40The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the
@@ -52,7 +54,7 @@ and those going out of the controller.
52 54
53## Output Payloads 55## Output Payloads
54Output payloads are those that originate from the controller and are bound for 56Output payloads are those that originate from the controller and are bound for
55the device. These always appear to contain a _type field. I have observed the 57the device. These always appear to contain a \_type field. I have observed the
56following output payloads. 58following output payloads.
57 59
58 _type: firmware upgrade (upgrade) 60 _type: firmware upgrade (upgrade)