Free tool · Runs in your browser

Teltonika Packet Decoder

Paste a Teltonika packet as hex and read the codec, the GPS records, the IO elements, the CRC and the acknowledgement your server has to send back. The same card builds a Codec 12 or Codec 14 command. Nothing is uploaded: the decoder runs in this page.

Spaces, newlines and 0x prefixes are fine.

Paste a packet above, or start from one of the examples.

Codec 8, Codec 8 Extended and Codec 16

Every AVL data field starts with a codec id and a record count. Codec 8 (0x08) is the original format: one-byte IO element ids, one-byte counts for each element width (1, 2, 4 and 8 bytes) and fixed-width values. Codec 8 Extended (0x8E) uses two-byte IO element ids and two-byte counts, and adds a group of variable-length (NX) elements whose value is a byte string rather than a number, which is how it carries iButton lists, barcode data and similar payloads. Codec 16 (0x10) also uses two-byte ids and adds a generation type byte that says why the record was created: on change, periodically, on entering or leaving a geofence, and so on.

Each record opens with a 64-bit UTC timestamp and a priority, then the GPS block: longitude and latitude in 1e-7 degrees, altitude, heading, satellites and speed. The record then names the IO element that triggered it, followed by the IO elements themselves.

TCP and UDP framing

Over TCP the packet is a four-byte zero preamble, a four-byte data field length, the data field and a four-byte CRC-16 of that data field. The CRC covers the data field only: from the codec id to the end of the records, without the preamble, the length or the CRC itself. Including any of those in the calculation produces a mismatch on a packet that is otherwise valid.

Over UDP there is no preamble and no CRC. The datagram starts with the payload length (2 bytes), a packet id (2 bytes), a one-byte AVL packet id, a two-byte IMEI length and the IMEI in ASCII, followed by the data field. The UDP header identifies the device, so a UDP packet can arrive without the separate login that TCP uses.

The acknowledgement the server must send

A device will not treat an AVL packet as delivered until the server acknowledges it. Over TCP the acknowledgement is a four-byte big-endian count of the records the server accepted: one record is 00000001, two records are 00000002. Over UDP it is seven bytes: 0005, the packet id, 01, the AVL packet id and the accepted record count. The decoder prints the exact acknowledgement for the packet you paste.

Codec 12, 13 and 14 commands

Commands travel the other way, from the server to the device. Codec 12 carries a text command and relies on the TCP connection to identify the device. Codec 13 adds a timestamp so the device can reject stale commands. Codec 14 carries the device IMEI inside the packet, for links where the connection itself does not identify the device. The device answers with Codec 12 type 0x06 (a response) or type 0x11 (a nACK, including an IMEI that did not match).

AVL IDs and open-source code

IO element names differ between device families, so the decoder shows the raw id and value even when no name is known. The Teltonika AVL ID list gives the names, byte widths and models for each id. The decoding runs on teltonika-codec, the open-source TypeScript library we publish under the MIT licence; it is also on npm, so the same parsing can run in your own server or script.

FAQ

How do I decode a Teltonika Codec 8 packet?

Paste the packet as hex, from a device log, a Wireshark capture or your own code. Spaces, newlines and 0x prefixes are ignored. Leave the transport on Auto unless you know whether the bytes came over TCP or UDP, press Decode packet, and the page shows the codec, the records, the CRC and the IO elements. Adding the device model, such as FMB920, makes the IO names more precise.

What is the difference between Codec 8 and Codec 8 Extended?

Both carry the same GPS block and records. Codec 8 uses one-byte IO element ids, one-byte counts per element width and fixed-width values, so it is limited to 255 elements of each width. Codec 8 Extended uses two-byte ids and two-byte counts, and adds a variable-length (NX) group whose elements have a two-byte id and a two-byte length, for byte strings such as iButton lists or barcode data.

What should the server reply to an AVL packet?

Over TCP, a four-byte big-endian count of the records the server accepted, for example 00000001 for one record. Over UDP, a seven-byte acknowledgement: 0005, the packet id, 01, the AVL packet id and the accepted record count. The decoder prints the exact bytes for the packet you paste, so you can compare them with what your server sends.

Why does my packet show a CRC mismatch?

The TCP CRC is calculated over the AVL data field only: from the codec id to the end of the records, without the four-byte preamble, the four-byte length and the CRC itself. A mismatch usually means extra bytes before or after the data field, a truncated capture, or a UDP packet decoded as TCP. The records are still shown so you can check whether the packet looks complete.

Is my data sent anywhere?

No. The packet is decoded by JavaScript in this page, on your device, and is never uploaded. The codec library and the AVL id table are downloaded on the first decode and then cached by the browser; after that the page keeps working offline.

Let's connect

  • “Our client needed a data pipeline. It came back working, plus a few Wialon fixes we had not asked for. That client trusts us more now.”
    Faiz K. Customer Manager · Trakpro Limited