In this chapter, all formats of messages are described. Messages of a specified type can be requested using flags (see their list below):
All flags are only used in DEC format.
Messages types:
Flag HEX | Flag DEC | Description |
---|---|---|
Unit messages | ||
0x0000 | 0 | messages with data |
0x0100 | 256 | SMS |
0x0200 | 512 | command |
0x0600 | 1536 | event |
Resource messages | ||
0x0300 | 768 | notification |
0x0500 | 1280 | billing message |
0x0900 | 2304 | SMS for driver |
Log | ||
0x1000 | 4096 | Log messages |
In order to delete specific messages you must have the following ACL-flags:
What to delete | 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) |
More info you can get from ACL-flags.
Message with data
Flag – 0x0000
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags (see below)*/ "tp":"ud", /* message type (ud - message with data) */ "pos":{ /* position */ "y":<double>, /* latitude */ "x":<double>, /* longitude */ "z":<int>, /* altitude */ "s":<uint> /* speed */ "c":<uint>, /* course */ "sc":<ubyte> /* satellites count */ }, "i":<uint>, /* input data */ "o":<uint>, /* output data */ "p":{ /* parameters */ <text>:<double>, ... } }
Flags of messages with data:
Value HEX | Value DEC | Description |
---|---|---|
0x01 | 1 | position information is available |
0x02 | 2 | input data information is available |
0x04 | 4 | output data information is available |
0x08 | 8 | state information is available |
0x10 | 16 | message contains alarm bit |
0x20 | 32 | message contains information about driver code |
0x20000 | 131072 | message was corrected by lbs |
SMS
Flag – 0x0100(256)
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: SMS messages has no flags, therefore 0 will be placed */ "tp":"us", /* message type (us - SMS message) */ "st":<text>, /* text of message */ "mp":<text>, /* modem phone number */ "p":{} /* parameters */ }
Command
Flag – 0x0200(512)
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: messages with commands has no flags, therefore 0 will be placed */ "tp":"ucr", /* message type (ucr - 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 i chapter Commands: create, edit, delete.
Event
Flag – 0x0600(1536)
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags (see below) */ "tp":"evt", /* message type (evt - event) */ "et":<text>, /* text of event */ "x":<double>, /* longitude */ "y":<double>, /* latitude */ "p":{} /* parameters */ }
Event flags:
Value HEX | Value DEC | Description |
---|---|---|
0x0 | 0 | simple event |
0x1 | 1 | violation |
0x2 | 2 | maintenance event |
0x4 | 4 | route control event |
0x10 | 16 | is set in addition to flag 0x2: maintenance is registered |
0x20 | 32 | is set in addition to flag 0x2: registered filling |
Notification
Flag – 0x0300(768)
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: messages with notifications has no flags, therefore 0 will be placed */ "tp":"xx", /* message type */ "p":{} /* parameters */ }
Billing message
Flag – 0x0500(1280)
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: 0x1 - is set when message contains information about payment */ "tp":"xx", /* message type */ "p":{} /* parameters */ }
SMS for driver
Flag – 0x0900(2304)
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: 0x1 - is set when 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
Flag – 0x1000(4096)
{ "t":<uint>, /* message time (UTC) */ "f":4096, /* flags: 4096 - log messages */ "tp":"xx", /* message type */ "p":{ /* parameters */ "user":<text>, /* user name */ "action":<text>, /* action */ "host":<text>, /* host */ "p1":<text>, /* parameters */ ... } }
Messages
messages format.
REG;time;lon;lat;speed;course;double params;int params;text params;long params;boolean params;
Inside the section parameters separated by commas.
Example
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";;;