Wialon IPS is the protocol Gurtam wrote for GPS and GLONASS trackers that send data to a monitoring server, and it is the one you reach for when the sender is your own firmware, a mobile app, a gateway or a test script rather than a catalogued tracker. A device opens a TCP connection, logs in with its ID, and sends text packets that carry position, inputs, sensors and arbitrary named parameters. The server answers every packet with a short code. This page is the packet reference: the two protocol generations, every packet a device sends and what the server answers, the CRC16 rule that v2.0 adds, and a worked exchange you can paste into a socket.
Everything below is taken from Gurtam’s own specification documents, listed in the next section. Where the documents disagree with each other or say nothing, the page says so instead of guessing; those cases are collected at the end.
Which specification to read
Gurtam publishes the protocol as separate documents, and the names are confusing because the version of the document and the version written on the wire are not the same number. The Wialon IPS device page links the current ones.
| Document | What it is | Link |
|---|---|---|
| Wialon IPS v.1.1 | The original text protocol, no checksum, no version field | |
| Wialon IPS v. 2.0 | Adds the protocol version field and CRC16; its change log is dated 10/2014 | |
| Wialon IPS v. 2.2 | The current document: everything in 2.0 plus fractional seconds, Wi-Fi positioning, video and extra error codes |
There is also a v. 2.1 document, which sits between the two and is not linked from the device page. The rest of this page uses v1.1 for the old protocol and v. 2.2 for the new one, and notes where the v. 2.0 document differs.
One detail trips people up: the login packet in the v. 2.2 document still says the current protocol version is 2.0. Documents 2.0, 2.1 and 2.2 are revisions of one wire protocol, and 2.0 is the value a device writes in its login. When this page says “v2.0” for packets, it means that wire protocol, which is what “Wialon IPS v2” in a device manual refers to. Gurtam also publishes a one-page comparison sheet of v.1.1 against v.2.2, which the differences table below follows.
The device page also states that the protocol is distributed freely under the GNU FDL, which is why it is built into so many trackers and servers.
Transport, connection rules and ports
IPS runs over TCP or UDP. TCP is the main transport because the server answers each packet and commands can travel back to the device. UDP is a traffic saver with no delivery guarantee, and the spec says it carries data from the controller to the server only: no commands can be sent to the device over it.
The v. 2.2 document sets three rules for TCP:
- Keep the connection open for the whole data transfer. If the device disconnects right after sending, the server has no time to answer, and traffic consumption goes up.
- One TCP connection carries one device. If a connection carries several, Wialon registers only the device whose ID came first in the incoming data.
- Every connection starts with the login packet. Other data goes out only after the server confirms the authorization.
On the port, the spec itself defines none. The Wialon IPS device page gives 20332 as the server port for Wialon Hosting, and says to create the unit with device type Wialon IPS and unique ID custom. A different server that speaks IPS listens on whatever port its operator configured.
What changed between v1.1 and v2.0
Gurtam’s comparison sheet lists the differences as follows, and the v. 2.0 document’s change log confirms the version field, CRC16, the new checksum error codes and the tachograph packets.
| v1.1 | v2.0 | |
|---|---|---|
| Checksum | None | CRC16 on all packets except the ping |
| Protocol version field | No | Yes, in the L packet and in every UDP packet |
| Login packet | #L#imei;password | #L#2.0;imei;password;CRC16 |
| Server codes for a bad checksum | Not applicable | Added to AL, ASD, AD, AM, AI, AIT, AT |
| Fixed parameters | Panic button (SOS) and driver message (text) | Alarm, driver chat, LBS positioning and, from the 2.1 document on, Wi-Fi positioning |
| AD error codes | From -1 to 15 | From -1 to 16, plus 15.1 and 15.2 |
| AI error codes | 0, 1 and success | 0, 1, 01, NA and success |
| Custom message command | No | Yes |
Snapshot query (QI) | No | Yes |
| Tachograph (DDD) file upload | No | Yes (QT, IT, T) |
| Video | No | Yes (QLV, LV, QPB, PB, QVS, VS, QVF, VF, QTM, TM) |
Two more differences show up when you read the documents side by side rather than the sheet. The v1.1 document gives the time as HHMMSS, while the 2.1 and 2.2 documents give HHMMSS.nnnnnnnnn; the v. 2.0 document still says HHMMSS. And the v1.1 document describes a parameter name only as a custom string, where the 2.x documents define a character set and a length limit (see Params).
A v1.1 device cannot be pointed at a v2.0 parser by changing a flag: the login line has a different shape and every later packet gains a checksum. The server’s AL answer lists “incorrect protocol version” and “incorrect packet structure” among the reasons for code 0.
The packet frame
Every packet is text in this shape, with a type, a message body and, in v2.0, a checksum before the line end:
#PT#msgCRC\r\n# is the start byte, PT the packet type, the second # a delimiter, msg the message text, CRC the CRC16 and \r\n the end of the packet (0x0D0A). In v1.1 the frame is the same minus the CRC. The types in v. 2.2:
| Type | Meaning | Sender |
|---|---|---|
L, AL | Login, answer to login | Device, server |
SD, ASD | Short data packet, answer | Device, server |
D, AD | Extended data packet, answer | Device, server |
B, AB | Black box packet, answer | Device, server |
P, AP | Ping, answer | Device, server |
M, AM | Message to or from the driver, answer | Server or device, server |
I, AI | Snapshot packet, answer | Device, server |
QI | Query snapshot command | Server |
QT, IT, AIT, T, AT | Tachograph file request, information packet, block packet and their answers | Server and device |
US, UC | Upload firmware, upload configuration | Server |
QLV, LV, QPB, PB, QVS, VS, QVF, VF, QTM, TM | Video commands and packets | Server and device |
The v1.1 document lists only L, D, P, SD, B, M, I, US, UC and their answers.
Login packet
#L#Protocol_version;IMEI;Password;CRC16\r\n| Field | Meaning |
|---|---|
Protocol_version | The current protocol version; 2.0 |
IMEI | IMEI, ID or serial number of the controller |
Password | Password for access to the device; NA if there is none |
CRC16 | Checksum, see CRC16 |
In v1.1 the packet is #L#imei;password\r\n, with the same NA rule for the password.
The server answers with an AL packet:
| Code | Meaning (v2.0) | Example |
|---|---|---|
1 | Unit successfully authorized | #AL#1\r\n |
0 | Connection rejected: incorrect protocol version, the unit is not created on the server, or incorrect packet structure | #AL#0\r\n |
01 | Password verification error | #AL#01\r\n |
10 | Checksum verification error | #AL#10\r\n |
v1.1 answers only 1, 0 and 01. Code 0 is the one to expect while integrating: three different mistakes produce it, and the answer does not say which.
Short data packet
The short packet carries navigation data only.
#SD#Date;Time;LatDeg;LatSign;LonDeg;LonSign;Speed;Course;Alt;Sats;CRC16\r\n| Field | Meaning |
|---|---|
Date | DDMMYY, UTC. NA if there is no data |
Time | HHMMSS.nnnnnnnnn, UTC (2.1 and 2.2 documents; HHMMSS in 1.1 and 2.0). NA if there is no data |
LatDeg;LatSign | Latitude in the NMEA form described below, then N or S. NA;NA if there is no data |
LonDeg;LonSign | Longitude, then E or W. NA;NA if there is no data |
Speed | Integer, km/h. NA if there is no data |
Course | Integer, 0 to 359 degrees. NA if there is no data |
Alt | Integer, metres. NA if there is no data |
Sats | Integer number of satellites. NA if there is no data |
CRC16 | Checksum |
If Date and Time are both NA, the message is registered with the current server time. The server answers with ASD:
| Code | Meaning |
|---|---|
-1 | Incorrect packet structure |
0 | Incorrect time |
1 | Packet successfully registered |
10 | Error receiving coordinates |
11 | Error receiving speed, course or altitude |
12 | Error receiving the number of satellites |
13 | Checksum verification error (v2.0 only) |
Coordinates in the NMEA form
Coordinates follow NMEA 0183, not decimal degrees. Latitude is DDMM.MM: two digits of degrees, zero-padded, then integer minutes, a point and a fractional part of minutes of variable length. Longitude is DDDMM.MM with three digits of degrees. The spec’s own example is 5544.6025;N: 55 degrees plus 44.6025 / 60 minutes, which is +55.743375. Longitude 03739.6834;E is 037 degrees plus 39.6834 minutes, +37.66139. N and E are positive, S and W negative, and leading zeros are never dropped.
Extended data packet
The extended packet adds precision, I/O, analog values, a driver key and named parameters.
#D#Date;Time;LatDeg;LatSign;LonDeg;LonSign;Speed;Course;Alt;Sats;HDOP;Inputs;Outputs;ADC;Ibutton;Params;CRC16\r\nThe first ten fields are those of the short packet, with the same NA rules. The new ones:
| Field | Meaning |
|---|---|
HDOP | Horizontal dilution of precision; the smaller, the more accurate the coordinates. NA if there is no data |
Inputs | Digital inputs as an integer, one bit per input starting from the low-order bit. NA if there are none |
Outputs | Digital outputs, same encoding. NA if there are none |
ADC | Analog inputs as fractional numbers separated by commas, numbered from 1, for example 14.77,0.02,3.6. An empty string, not NA, if there are none |
Ibutton | Driver key code, a string of arbitrary length. NA if there is none |
Params | Additional parameters, separated by commas |
CRC16 | Checksum |
The empty-string rule for ADC is the odd one out, and it is stated the same way in v1.1.
Params: the name, type, value triples
Each parameter is Name:Type:Value, for example count1:1:564, fuel:2:45.8, hw:3:V4.5, SOS:1:1.
| Part | Rule |
|---|---|
Name | Latin letters, lowercase, at most 38 characters. Not allowed: space, comma, colon, number sign, line feed, carriage return |
Type | 1 integer or long, 2 double, 3 string of at most 1344 characters |
Value | Depends on the type. If it does not match, the parameter is not registered |
Wialon can register at most 200 parameters, and the protocol itself does not limit how many you send. The spec says a parameter whose value does not match its type is not registered, and that the same applies to a name that breaks the rules; the AD codes 15.1 and 15.2 below name two of those cases.
The 2.x documents define fixed parameter names with special meaning:
| Purpose | Parameter |
|---|---|
| Alarm, shown in red | SOS, type 1, uppercase; value 1 means the alarm is triggered |
| Chat with drivers | text, type 3 |
| LBS positioning | mcc, mnc, lac, cell_id, all integers; for several cells add an index to the names: mcc1, mnc1, lac1, cell_id1, mcc2 and so on |
| Wi-Fi positioning (2.1 and later documents) | wifi_mac_# as a string, bytes separated by minus signs, for example 74-D8-3E-40-B8-7A, and wifi_rssi_# as an integer signal level; # is an index for several pairs |
Wialon stores a Wi-Fi MAC lowercased with colons, 74:d8:3e:40:b8:7a, even if it was sent in upper case with minus signs, because colons are not allowed in the value as sent. v1.1 knows only two special parameters: SOS of type 1 for the panic button, and text of type 3 for a driver message that can also carry position and other parameters.
The AD answer
| Code | Meaning |
|---|---|
-1 | Incorrect packet structure |
0 | Incorrect time |
1 | Packet successfully registered |
10 | Error receiving coordinates |
11 | Error receiving speed, course or altitude |
12 | Error receiving the number of satellites or HDOP |
13 | Error receiving Inputs or Outputs |
14 | Error receiving ADC |
15 | Error receiving additional parameters |
15.1 | Parameter name longer than 40 characters; that parameter is not registered |
15.2 | Parameter name contains a space; that parameter is not registered |
16 | Checksum verification error |
v1.1 stops at 15, and the v. 2.0 document stops at 16 without 15.1 and 15.2.
Black box packet
The black box packet sends messages for a past period, several in one packet. It holds up to 5000 messages.
#B#Date;Time;...;Sats|Date;Time;...;Sats|Date;Time;...;Sats|CRC16\r\nThe body is a set of short or extended data bodies without the packet type field, separated by a vertical bar, and the spec’s format picture ends the last record with a bar as well. The server answers AB: a number, the count of messages successfully registered (#AB#3\r\n), or an empty string (#AB#\r\n) when the checksum does not verify. In v1.1 the answer is also the count of registered messages, and its examples show #AB#3 and #AB#0.
Ping packet
#P#\r\nThe ping keeps a TCP connection alive and checks that the channel is available. The server answers #AP#\r\n. It carries no body and no CRC.
Messages, images, tachograph files and other commands
Beyond data, the spec defines packets for messages and files. A device that only reports position never needs any of these, but they are the reason IPS is more than a coordinate format.
| Packet | Direction | Format | What it does |
|---|---|---|---|
M | Both | #M#Msg;CRC16\r\n | Text message to or from the driver. No size limit from Wialon to device; 4 KB from device to Wialon (v. 2.2) |
QI | Server to device | #QI#\r\n | Requests a snapshot (2.x) |
I | Device to server | #I#Sz;Ind;Count;Date;Time;Name;CRC16\r\nBIN | One block of an image. Blocks are numbered from zero, Count is the number of the last block, and the recommended block size is up to 50 KB |
QT | Server to device | #QT#DriverID\r\n | Requests a tachograph file |
IT | Device to server | #IT#Date;Time;DriverID;Code;Count;CRC16\r\n | Announces a DDD file; sent before the blocks. The saved file is named driverid_yyyymmdd_hhmmss.ddd |
T | Device to server | #T#Code;Sz;Ind;CRC16\r\nBIN | One block of the DDD file, on the same TCP connection as the IT packet |
US | Server to device | #US#Sz;CRC16\r\nBIN | Firmware upload (v1.1: #US#sz\r\nBIN) |
UC | Server to device | #UC#Sz;CRC16\r\nBIN | Configuration file upload (v1.1: #UC#sz\r\nBIN) |
| custom | Server to device | Msg\r\n | A custom command; the device can reply with an M packet or, for position and parameters, a D packet |
The answers:
| Answer | Codes |
|---|---|
AM | 1 message received, 0 error receiving, 01 checksum error. v1.1: 1 and 0 |
AI | #AI#Ind;1 block received, #AI#Ind;0 error, #AI#Ind;01 checksum error, #AI#NA;0 incorrect packet structure, #AI#1 image fully received and saved in Wialon |
AIT | 1 received, 0 error, 01 checksum error |
AT | #AT#Ind;1, #AT#Ind;0, #AT#Ind;01 for a block, #AT#1 DDD file fully received and saved |
The spec warns that if the server cannot receive an image block it disconnects, and recommends smaller blocks in that case. The v1.1 document shows the image exchange as a sequence: the device sends block 0, the server answers #AI#0;1, block 1 goes out, the server answers #AI#1;1, and then #AI#1 confirms the whole photo.
Video, in the v. 2.2 document, is a separate set of commands for live stream (QLV, LV), playback (QPB, PB), stopping a stream (QVS, VS), downloading a file (QVF, VF) and listing stored files (QTM, TM). After a video request the device connects to the media server given in the command, logs in with the usual L packet and then sends the video packets, which carry a header line followed by dataLen bytes of binary data. That is a different protocol surface from position reporting and is outside this page; read the v. 2.2 PDF if you build a video device.
CRC16, the v2.0 checksum
The CRC16 is appended as hexadecimal ASCII characters, big-endian. The spec’s example: 0xFC45 is sent as the four characters FC45 (0x46433435). The part of the packet that is checksummed depends on the packet:
| Packets | Checksummed part |
|---|---|
L, SD, D, M, IT | Everything between the packet type and the CRC16 field, for example Date;Time;...;Sats; for a short packet. The delimiter before the CRC is included |
B | The records and the trailing bar before the CRC16 |
I, US, UC, T | The binary BIN field only |
The reference implementation in the spec is a table-driven C function with initial value 0. This is the same computation without the table, in TypeScript, with the packet builder used in the example below:
// Reflected polynomial 0xA001, initial value 0: the same result as the spec's crc16_table.
function crc16(data: Uint8Array): number {
let crc = 0;
for (const byte of data) {
crc ^= byte;
for (let i = 0; i < 8; i++) crc = crc & 1 ? (crc >>> 1) ^ 0xa001 : crc >>> 1;
}
return crc;
}
// body is everything between "#TYPE#" and the CRC, including the trailing ";" (or "|" for B).
function packet(type: string, body: string): string {
const crc = crc16(Buffer.from(body)).toString(16).toUpperCase().padStart(4, "0");
return `#${type}#${body}${crc}\r\n`;
}
packet("L", "2.0;imei;NA;"); // "#L#2.0;imei;NA;A932\r\n"That output is the spec’s own compressed login example, #L#2.0;imei;NA;A932, and the same function reproduces the checksum 4BC3 on the spec’s extended data example. Check your implementation against those two vectors before connecting to a server. The spec’s examples write the digits in upper case, and it does not say whether lower case is accepted, so send upper case.
Server answers are never checksummed.
Compression
Packets sent to the server may be compressed, which is worth it for large black box packets. The algorithm is DEFLATE from zlib, on TCP and on UDP. The compressed container is one packet in text form wrapped like this:
| Bytes | Field | Content |
|---|---|---|
| 1 | Head | 0xFF |
| 2 | Len | Length of the data block, 16-bit little-endian |
| Len | Data | The compressed block, sent as is |
Compressed and plain packets can be mixed on one connection, and the server always answers in plain text. The container holds exactly one packet. The v1.1 document adds that the closing \r\n can be left off before compression.
The v. 2.2 spec gives a compressed login as its example. The hex FF1B00780153F65136D233B0CECC4DCDB4F673B476B4343602002FF404E6 is FF, then 1B00 (27 bytes, little-endian), then 27 bytes of zlib data that inflate to #L#2.0;imei;NA;A932. The spec notes that library identifiers such as Z_DEFAULT_COMPRESSION change the compressed bytes, but the message is valid in any case, so there is no need to match the example byte for byte.
UDP framing
A UDP packet is the TCP packet with Protocol_version;IMEI placed in front, so that every datagram identifies its device:
2.0;IMEI#SD#Date;Time;LatDeg;LatSign;LonDeg;LonSign;Speed;Course;Alt;Sats;CRC16\r\nIn v1.1 the prefix is just the IMEI: imei#SD#date;time;...\r\n. Data goes from device to server only, and commands cannot be sent back.
A worked login and data exchange
This is a plausible session for a device with ID 860000000000001 and no password, on 1 December 2026. The checksums were computed with the function above, which reproduces the spec’s own A932 and 4BC3 vectors. The coordinates, IDs and values are made up. \r\n ends every line.
device: #L#2.0;860000000000001;NA;86E9\r\n
server: #AL#1\r\n
device: #SD#011226;101500;5544.6025;N;03739.6834;E;40;120;150;9;1292\r\n
server: #ASD#1\r\n
device: #D#011226;101530;5544.6025;N;03739.6834;E;42;125;151;10;0.9;3;0;14.77,0.02;NA;fuel:2:45.8,ign:1:1;FF38\r\n
server: #AD#1\r\n
device: #P#\r\n
server: #AP#\r\n
device: #B#011226;101000;5544.5900;N;03739.6700;E;30;90;149;8|011226;101015;5544.5950;N;03739.6750;E;33;92;149;8|4153\r\n
server: #AB#2\r\nThe login says the protocol is 2.0, the unit’s ID, and NA for the password. #AL#1 unlocks the connection. The short packet reads as 1 December 2026, 10:15:00 UTC, 55.743375 north and 37.66139 east, 40 km/h on course 120 at 150 m with 9 satellites. The extended packet adds HDOP 0.9, inputs 3 (the first two inputs high), outputs 0, two analog readings 14.77 and 0.02, no driver key, and two parameters: a double fuel and an integer ign. The black box packet delivers two earlier positions in one send, and #AB#2 confirms both.
The same extended packet in v1.1 has no version, no checksum and no trailing semicolon:
device: #L#860000000000001;NA\r\n
server: #AL#1\r\n
device: #D#011226;101530;5544.6025;N;03739.6834;E;42;125;151;10;0.9;3;0;14.77,0.02;NA;fuel:2:45.8,ign:1:1\r\n
server: #AD#1\r\nIf one character of a v2.0 packet is wrong, the checksum no longer matches and the server says so with the code for that packet, instead of registering it. Here the final FF38 of the extended packet is changed to FF39:
device: #D#011226;101530;5544.6025;N;03739.6834;E;42;125;151;10;0.9;3;0;14.77,0.02;NA;fuel:2:45.8,ign:1:1;FF39\r\n
server: #AD#16\r\nAn alarm is just a parameter. This packet marks the unit as having raised the alarm:
device: #D#011226;101600;5544.6034;N;03739.6850;E;0;125;151;10;0.9;1;0;14.80,0.02;NA;SOS:1:1;2E2E\r\n
server: #AD#1\r\nCommon mistakes
- Closing the socket after the send. The server never gets to answer, and the spec calls out the extra traffic. Wait for the answer, then reuse the connection.
- Sending data before
#AL#1. The login has to succeed first. A rejected login (0,01,10) means nothing after it will be accepted. - Several devices on one connection. Only the first ID is registered. A gateway that forwards many units needs one connection each.
- Checksumming the wrong span. The CRC covers the text between
#TYPE#and the checksum, including the last semicolon (the last bar for a black box). It does not cover the#, the type or the line end. For image, firmware, configuration and tachograph block packets it covers the binary payload alone. - Decimal degrees in the coordinate fields. They are
DDMM.MMMMandDDDMM.MMMMplus a hemisphere letter. Sending55.743375is not the same position in a different format; it is a malformed field, and10, error receiving coordinates, is the documented answer for a bad coordinate field. - Typed values that do not match. A
fuel:2:abcparameter is not registered. A name with a space produces15.2, an over-long name15.1, and a name outside the allowed characters is invalid. - Using
NAfor an empty ADC. An empty ADC field is an empty string; every other missing field isNA. - Time outside the format.
DateisDDMMYYandTimeisHHMMSS, both UTC.NAin both fields makes Wialon register the packet with the current server time. - More than 5000 messages in a black box packet. That is the documented ceiling.
- Treating
0from the server as one error. Login code0covers a wrong protocol version, a unit that does not exist and a malformed packet. Check the unit first, then the login line.
Where the spec is silent or inconsistent
A few things the specification does not settle:
- Parameter name length. The parameter table says the maximum is 38 characters. The AD code
15.1says the name is more than 40. Stay at 38 or below. - The port. The spec has none.
20332comes from the Wialon IPS device page for Wialon Hosting, not from the protocol documents. - Ping interval. The ping packet is defined, but the documents give no interval and no timeout.
- Extended records inside a black box. The format picture shows short-packet records with no checksum between them. The text says the body can hold short or extended records without the type field. It does not say whether an extended record inside a black box has any checksum of its own beyond the one at the end of the packet.
- Hex case in the CRC. The examples use upper case; nothing says lower case is rejected.
- Which IPS version Wialon sends on retransmission. The retranslator forwards over IPS, but the specification does not describe the retranslator, and nothing here says which version it emits. Capture a connection if the receiver depends on it.
- Type mismatches. The spec says a parameter with a value of the wrong type is not registered. It does not say which AD code, if any, the server returns for that case.
- The change log versus the format. The v. 2.0 change log lists CRC16 as added to L, SD, D, M, I, IT, T, US and UC, without B, while the black box format and the checksum table in the same document include it.
- The stop-video answer table. The v. 2.2 document lists code
12twice, for two different failure reasons. - The
Timefield. The v. 2.0 document saysHHMMSS, the 2.1 and 2.2 documentsHHMMSS.nnnnnnnnn, and the examples in the spec use whole seconds.
IPS inside Wialon
IPS is both a way in and a way out. As a way in, a unit created with device type Wialon IPS accepts exactly the packets above; the Remote API then reads the result back, parameters included, through the messages calls, and the units page covers last position. The Ibutton field carries the driver key code; how Wialon turns a code into a driver is on the drivers page.
As a way out, Wialon can forward unit messages to another server over IPS. That is the wialon_ips protocol of the retranslator, with the auth and attach_sensors options, so an IPS receiver is a valid target for it. Be aware that a unit already tied to a tracker cannot also receive IPS data as a second source, because the unit’s device type has to be Wialon IPS; the webhook article lays out the options when that is the problem.