Line 2,843: |
Line 2,843: |
| |} <br /> | | |} <br /> |
| | | |
| + | ='''<big>CODEC 15</big>'''= |
| + | |
| + | *'''<big>Protocol Overview</big>''' |
| + | |
| + | Codec 15 is based on Codec12 protocol. Codec15 is original Teltonika protocol for device->server communication over GPRS messages. |
| + | Codec15 is available in RS232 modes: |
| + | |
| + | 1. TCP/UDP Ascii |
| + | <br>2. TCP/UDP Binary |
| + | <br>3. TCP/UDP Ascii Buffered |
| + | <br>4. TCP/UDP Binary Buffered |
| + | |
| + | *'''<big>Structure of Codec 15 messages</big>''' |
| + | {| class="nd-othertables_2" style="width:100%;" |
| + | |+ |
| + | ! rowspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |0x00000000 (Preamble) |
| + | ! rowspan="1" style="width:5%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Data Size |
| + | ! rowspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |0x0F (Codec ID) |
| + | ! rowspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Command quantity |
| + | ! colspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Message type |
| + | ! rowspan="1" style="width:14%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Command size + timestamp + imei |
| + | ! rowspan="1" style="width:5%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Timestamp |
| + | ! rowspan="1" style="width:5%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |IMEI |
| + | ! rowspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Command |
| + | ! rowspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Command quantity |
| + | ! rowspan="1" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |CRC - 16 |
| + | |- |
| + | | style="vertical-align: middle; text-align: center;" |4 bytes |
| + | | style="vertical-align: middle; text-align: center;" |4 bytes |
| + | | style="vertical-align: middle; text-align: center;" |1 byte |
| + | | style="vertical-align: middle; text-align: center;" |1 byte |
| + | | style="vertical-align: middle; text-align: center;" |1 bytes |
| + | | style="vertical-align: middle; text-align: center;" |4 byte |
| + | | style="vertical-align: middle; text-align: center;" |4 bytes |
| + | | style="vertical-align: middle; text-align: center;" |8 bytes |
| + | | style="vertical-align: middle; text-align: center;" |X bytes |
| + | | style="vertical-align: middle; text-align: center;" |1 bytes |
| + | | style="vertical-align: middle; text-align: center;" |4 bytes |
| + | |- |
| + | |} |
| + | |
| + | *'''<big>Structure explanation</big>''' |
| + | '''Preamble''' - four zero bytes. |
| + | <br>'''Data size''' - size is calculated from codec id(0x0F) field to the second command quantity field. |
| + | <br>'''Codec ID''' - in Codec 15 it is always 0x0F. |
| + | <br>'''Command quantity''' - a number which defines how many commands are in the packet. |
| + | <br>'''Message type''' - this value is configurable in RS232 settings box. |
| + | <br>'''Command size + Timestamp + IMEI''' - it is equal to size of payload + size of timestamp + size of imei. |
| + | <br>'''Timestamp''' – data record creation time in seconds(Unix timestamp). |
| + | <br>'''IMEI''' - send as HEX value. Example if device IMEI is 123456789123456 then IMEI data field will contain 0x0123456789123456 value. |
| + | <br>'''Command field''' - actual received data. |
| + | <br>'''Command quantity''' - a number which defines how many commands are in the packet. |
| + | <br>'''CRC field''' - calculated from Codec ID to the Second Number of Data. |
| + | *'''<big>Codec 15 examples</big>''' |
| + | |
| + | Device sends messag „Hello\n“ via GPRS Codec15: |
| + | |
| + | 000000000000001b0f010b00000013654b65a4012345678912345648656c6c6f210a01000093d6 |
| + | |
| + | Parsed: |
| + | <br>'''Preamble''': 0x00000000 |
| + | <br>'''Packet Length''': 0x0000001b |
| + | <br>'''Codec''': 0x0f |
| + | <br>'''Quantity of commands''': 0x01 |
| + | <br>'''Command type''': 0x0b |
| + | <br>'''Command size''': 0x000000013 |
| + | <br>'''Timestamp''': 0x654b65a4 |
| + | <br>'''IMEI''': 0x0123456789123456 (HEX string) |
| + | <br>'''Command''': 0x48656c6c6f210a (HEX of Hello\n) |
| + | <br>'''Quantity of commands''': 01 |
| + | |
| + | CRC: 0x 000093d6 |
| + | The algorithm to calculate CRC is CRC-16 (also known as CRC-16-IBM). All the fields from codec ID to second command/response quantity field are used to calculate CRC. |
| ='''<big>24 Position SMS Data Protocol</big>'''= | | ='''<big>24 Position SMS Data Protocol</big>'''= |
| | | |