-
Notifications
You must be signed in to change notification settings - Fork 2
Protocol documentation
Chris edited this page Jan 26, 2020
·
2 revisions
The protocol seems to be split in several layers, which are located in different libraries.
This seems to be IrDA-SIR, with a baud rate of 115.2 kbit/s. As this is a standardized protocol, there should be documentation available on other parts of the internet.
The next layer seems to be some kind of link layer, as it contains an 'unique' address, checksum and packet length.
The names are not official in any means, but I will use them in the rest of the documentation,
Seems to correspond with the packet structure used by IR:USER
Name | offset (bytes) | lenght (bytes) | Description |
---|---|---|---|
Magic? | 0x0 | 0x1 | Always a5 ? |
ConnectionID | 0x1 | 0x1 | Connection ID, 00 if there is no connection made yet. (?) |
SetupFlag? | 0x2 | 0x1 | First bit: flag of some sort? 1 if no connection was made yet or wants to stop the connection? |
LargeFlag? | ^ | ^ | Second bit: flag of some sort? 1 if the packet size is larger than 63 bytes? |
PacketSize | ^ | ^ | Remaing 6 bits: length of the Data (in bytes) if BigFlag is not set. |
PacketSize | 0x3 (Not present if LargeFlag was not set) |
0x1 | Size (in the case that BigFlag was set, otherwise data starts here.) |
Data | 0x3 (0x4 if LargeFlag was set) |
Y | Data, see the next layer. |
Checksum | 0x3 + Y (0x4 + Y if LargeFlag was set) |
0x1 | 8-bit CRC over all the previous bytes |