messages

This chapter describes the formats of all message types. You can request messages of a specific type using flags.

Message types

The following message types are available:

Flag in HEX

Flag in DEC

Description

0x0000

0

Data message

0x0100

256

SMS

0x0200

512

Command

0x04001024User log
0x0300768User notification
0x05001280

Billing message

0x0600

1536

Event

0x07001792Plot cultivation
0x08002048WDC service record
0x09002304

SMS from driver

0x10004096Log record
0x20008192Video usage 
0x400016384Notification trigger message

To delete specific messages, you must have the following ACL flags:

Message type

Message flag HEX(DEC)

ACL flag HEX(DEC)

Data message

0x0000(0)

0x800000(8388608)

SMS

0x0100(256)

0x800000(8388608)

Command

0x0200(512)

0x800000(8388608)

Event

0x0600(1536)

0x2000000(33554432)

Log

0x1000(4096)

0x800(2048)

Data message

The flag of data messages is 0x0000.

Copied!
{
    "t": <uint>,       /* Message time (UTC) */
    "f": <uint>,       /* Flags (see below) */
    "tp": "ud",        /* Message type ('ud' denotes a data message) */
    "pos": {           /* Location */
        "y": <double>, /* Latitude */
        "x": <double>, /* Longitude */
        "z": <int>,    /* Altitude */
        "s": <uint>,   /* Speed */
        "c": <uint>,   /* Course */
        "sc": <ubyte>  /* Number of satellites */
    },
    "i": <uint>,       /* Input data */
    "o": <uint>,       /* Output data */
    "p": {             /* Parameters */
        <text>: <double>
        ...
    },
    "lc": <int>,       /* LBS message checksum */
    "rt": <uint>       /* Message registration time (UTC) */
}

Data message flags:

HEX value

DEC value

Description

0x01

1

Location data is available.

0x02

2

Information about input data is available.

0x04

4

Information about output data is available.

0x10

16

The message contains an alarm bit.

0x20

32

The message contains information about the driver code in the avl_driver parameter.

0x20000

131072

The message was corrected by LBS.

SMS

The flag of SMS messages is 0x0100(256).

Copied!
{
    "t": <uint>,   /* Message time (UTC) */
    "f": <uint>,   /* Flags: SMS messages have no flags, so 0 will be placed */
    "tp": "us",    /* Message type ('us' denotes an SMS message) */
    "st": <text>,  /* Message text */
    "mp": <text>,  /* Modem phone number */
    "p": {}        /* Parameters */
}

Command

The flag of commands is 0x0200(512)

Copied!
{
	"t": <uint>,	/* Message time (UTC) */
	"f": <uint>,	/* Flags: commands have no flags, so 0 will be placed */
	"tp": "ucr",	/* Message type ('ucr' denotes a command) */
	"ca": <text>,	/* Command name */
	"cn": <text>,	/* Command type */
	"cp": <text>,	/* Command parameters */
	"ui": <uint>,	/* User ID */
	"ln": <text>,	/* Link name */
	"lt": <text>,	/* Link type */
	"et": <uint>,	/* Execution time */
	"p": {}		    /* Parameters */
}

Link types are described on the Update command definition page.

Event

The flag of events is 0x0600(1536).

Copied!
{
	"t": <uint>,    /* Message time (UTC) */
	"f": <uint>,    /* Flags (see below) */
	"tp": "evt",    /* Message type ('evt' denotes an event) */
	"et": <text>,   /* Event text */
	"x": <double>,  /* Longitude */
	"y": <double>,  /* Latitude */
	"p": {}         /* Parameters */
}

Event flags:

HEX value

DEC value

Description

0x0

0

Simple event.

0x1

1

Violation.

0x2

2

Maintenance service or fuel filling.

0x4

4

Route progress.

0x10

16

Maintenance service. This flag is set in addition to 0x2.

0x20

32

Fuel filling. This flag is set in addition to 0x2.

Notification

The flag of notifications is 0x0300(768).

Copied!
{
	"t": <uint>,	/* Message time (UTC) */
	"f": <uint>,	/* Flags: notifications have no flags, so 0 will be placed */
	"tp": "xx",	    /* Message type */
	"p": {}		    /* Parameters */
}

Billing message

The flag of billing messages is 0x0500(1280).

Copied!
{
	"t": <uint>,	/* Message time (UTC) */
	"f": <uint>,	/* Flags: 0x1 is set when the message contains payment information */
	"tp": "xx",	    /* Message type */
	"p": {}		    /* Parameters */
}

SMS to the driver

The flag of SMS messages is 0x0900(2304).

Copied!
{
	"t": <uint>,      /* Message time (UTC) */
	"f": <uint>,      /* Flags: 0x1 is set when the message is sent */
	"tp": "xx",       /* Message type */
	"p": {            /* Parameters */
		"phone": <text>,        /* Phone number */
		"sms_text": <text>,     /* SMS text */
		"driver_name": <text>,  /* Driver name */
		"driver_id": <uint>     /* Driver ID */
	}
}

Log

The flag of log records is 0x1000(4096)

Copied!
{
	"t": <uint>,      /* Message time (UTC) */
	"f": 4096,        /* Flags: 4096 denotes a log record */
	"tp": "xx",       /* Message type */
	"p": {            /* Parameters */
		"user": <text>,       /* Username */
		"action": <text>,     /* Action */
		"host": <text>,       /* Host */
		"p1": <text>,         /* Parameters */
		...		
	}
}

WLN messages

WLN messages have the following format:

Copied!
REG;time;lon;lat;speed;course;double params;int params;text params;long params;boolean params;

Inside the section, the parameters are separated by commas. Example:

Copied!
REG;1466585078;30.4367027283;59.7207145691;1;273;ALT:24.0,adc1:0.0,adc2:25.57,adc3:0.0,adc4:0.0,adc5:0.0,adc6:0.0,fuel1:0.0,fuel2:170.0,fuel3:0.0,odometer:7293607.0,acc:0.0,pwr_int:0.731,pwr_ext:25.751,hdop:1.7;in13:1,,SATS:5,count1:1,count2:0,temp1:0,temp2:23,temp3:0,sats_glonass:0,sats_gps:5;soft_version:"44";;;

Download PDF file
Download Word document

See also