Page tree
Skip to end of metadata
Go to start of metadata

Teltonika Codec14 communication protocol

Supported device types and versions
Communication line configuration
Communication station configuration
I/O tag configuration
Literature
Changes and modifications
Document revisions

Supported device types and versions


The communication protocol Teltonika Codec14 supports a data acquisition from the devices "Fleet Management Systems Unit" Teltonika of type FM4200 with firmware Movys.
The protocol represents TCP server to which the units are being connected online. The data come into system via configuration of so-called "master" station and I/O tags. I.e. whatever number of connected units send data to system via one sample configuration of the unit. A unique IMEI code of the unit identifies data from single units.

Communication line configuration


  • Communication line category: TCP/IP TCP.
  • Server host: all (TCP server), server port: well-known port according to the setting of the device.

Communication station configuration


Communication protocol: Teltonika Codec14.
Recommended setting of the station time intervals: delay 1 sec.

Station protocol parameters

Following station protocol parameters can be configured:

Table 1

Full name Meaning Unit Default value
Clients per Thread Number of the connected units handled by one thread. It is used for balancing the power and the response of communication process in dependence on the number of connected units. 1 up-to 200 50
Send Async Message Request After Connect KOM process will send 'Asynchronous Message Request' after a unit is connected. The unit will answer by 'Asynchronous Message Response' which contains the data (AVL record). YES/NO YES
Debug Packet Analyse Activation of debug information about the received and sent datagrams. YES/NO YES
Debug Values Activation of debug information about received values. YES/NO NO
Debug Packet Queue Flow Activation of debug information about the state of received data processing by D2000 System. YES/NO NO
Debug Packet Binary Contents Permission of debug lists containing the received/sent datagrams in binary form. YES/NO YES
Unit Debug File Permission of special form of tracing the units when the debug information is saved into special file. The name of this file is derived from IP address of unit (IP1_IP2_IP3_IP4.log) in subdirectory "trace" of application directory. It makes easier the identification of debug lists from the unit.

Meaning of parameters:

Not_Allowed - the file will not be created
Both Line & Station - the file will be created in parallel with standard .log file which traces the communication line
Station Only - only special log files are allowed
Warning! This setting overrides the level setting of communication tracing in the line configuration (see also the information in document Communication lines - configuration dialog box, section Communication tracing).

Not Allowed

Both Line & Station
Station Only

Not Allowed
Unit Debug File Size Maximal size of the special debug file of unit tracing. After the file reaches this size it will be renamed and saved alike the file of communication line tracing. 1 up-to 50 MBytes 10

I/O tag configuration


Possible value types of I/O tags: Ai, Ao, Ci, Co, Di, Dout, TiA, ToA, TxtI, TxtO.

List of I/O tag addresses

Table 2

Address Meaning Value type
HND.TRIG Message handshaking - an issue of the new increment value signalizes the setting of all I/O tag values with the values of received record and that they are ready to be processed. Ci
HND.TRIG_ACC Message handshaking - acknowledges that data was processed by application. It is executed by writing of value HND.TRIG and it signalizes that KOM process can create the next record. Co
STAT.CONN_NR Global Statistic - an actual number of the handled TCP connections. Ci
STAT.IN_QUEUE_LEN Global Statistic - number of received data files that are not sent to system yet. Ci
STAT.RD_TASKS_NR Global Statistic - number of received threads.  
STAT.VIRT_ST_NR Global Statistic - actual number of connected units with the unique IMEI.  
UNIT_DATA.IMEI Unit data - IMEI unit which data was received from. TxtI
UNIT_DATA.DTIME Unit data - time stamp of received data. The time stamp of value of all I/O tags UNIT_DATA.xxx is identical. TiA
UNIT_DATA.LAT Unit data - latitude. Ai
UNIT_DATA.LON Unit data - longitude. Ai
UNIT_DATA.ALT Unit data - altitude (m). Ai
UNIT_DATA.PRIO Unit data - data priority (0/1). Ci
UNIT_DATA.SAT Unit data - number of the visible satellites. Ci
UNIT_DATA.SPEED Unit data - speed (km/h). Ci
UNIT_EVENT.EvNr Unit event - value of the received events No. EvNr. More detailed information on the events is mentioned in literature about protocol Codec14. Ai/Di/Ci/TxtI
UNIT_DEBUG.DbgNr Unit debug - debug information with index DbgNr. More detailed information on the events is mentioned in literature about protocol Codec14. Ai/Di/Ci/TxtI
UNIT_STAT.ST_BYTES_IN Unit statistic & info - number of the received bytes from the unit since the KOM process has been started. Ci
UNIT_STAT.ST_BYTES_OUT Unit statistic & info - number of sent bytes to the unit since the KOM process has been started. Ci
UNIT_STAT.ST_CONFIG_TIMESTAMP Unit statistic & info - so-called config timestamp of the unit. TiA
UNIT_STAT.ST_CONNECTED Unit statistic & info - state of the connection (1-connected, 0-disconnected); only when the state is changed. Ci
UNIT_STAT.ST_CONNECTS Unit statistic & info - total number of the unit connections since the KOM process has been started. Ci
UNIT_STAT.ST_FW_VER Unit statistic & info - the version of the unit firmware. TxtI
UNIT_STAT.ST_PACKETS_IN Unit statistic & info - number of the received datagrams from the unit since the KOM process has been started. Ci
UNIT_STAT.ST_PACKETS_OUT Unit statistic & info - number of the sent datagrams to the unit since the KOM process has been started. Ci
UNIT_RESTART.IMEI Unit restart request - when the value IMEI is written into this I/O tag the request to restart the unit with this IMEI is sent. If the writing failed the unit will not be connected. TxtO
UNIT_MONITORING.IMEI Unit monitoring request - when the value IMEI is written into this I/O tag the request to monitor the unit with this IMEI is sent. If the writing failed the unit will not be connected. TxtO
UNIT_ASYNCMESS.IMEI Async message request - when the value IMEI is written into this I/O tag the request to receive the asynchronous info from the unit with this IMEI is sent. If the writing failed the unit will not be connected. TxtO
UNIT_DEBUG.IMEI Unit debug request - when the value IMEI is written into this I/O tag the request to receive the debug info from the unit with this IMEI is sent. The unit will response by UNIT_DEBUG.DbgNr values. If the writing failed the unit will not be connected. TxtO
UNIT_FW_UPD.PARAMS Firmware update request - when the requested information is written, the process of firmware update for the unit with given IMEI is initialized. The format of data: IMEI,APN,APNuser,APNpasswd,server:port,fw_filename.
More detailed information on the events is mentioned in literature about protocol Codec14.
TxtO
UNIT_PARAMS_OUT.IMEI Unit parameters write messaging - IMEI of the unit which the changes of the configuration parameters are sent to. TxtO
UNIT_PARAMS_OUT.ADDR Unit parameters write messaging - address of the written parameter (parameter ID). Co
UNIT_PARAMS_OUT.VALUE Unit parameters write messaging - value of the written parameter. TxtO
UNIT_PARAMS_OUT.VALUE_TYPE Unit parameters write messaging - value type of the written parameter. Co

Parameter writing

The following rules hold:

  1. The values of parameters can be only written, not read.
  2. The check, if the writing was all right, is made through the so-called Configuration Timestamp (I/O tag with address UNIT_STAT.ST_CONFIG_TIMESTAMP). The value "Config Timestamp" must be set during the parameters writing - it is the parameter with ID = 0 (Profile Timestamp). The value should be the unique absolute time (the best is the time of the configuration begin).
    After the parameters was written the value UNIT_STAT.ST_CONFIG_TIMESTAMP must be set on the value of parameter with ID=0 sent by user.
  3. Process of writing:
    • Set IMEI to I/O tag UNIT_PARAMS_OUT.IMEI, if it ends with error (on an action WAIT) the KOM process does not recognize the unit with this IMEI or it is not online.
    • Set the value type of parameter to UNIT_PARAMS_OUT.VALUE_TYPE (see the Table 3).
    • Set UNIT_PARAMS_OUT.VALUE with the value of parameter (as text).
    • Set UNIT_PARAMS_OUT.ADDR with the parameter ID. The parameter ID=0 "Profile Timestamp" should be the first.
    • Set UNIT_PARAMS_OUT.VALUE_TYPE of next parameter.
    • Set UNIT_PARAMS_OUT.VALUE with the value of next parameter.
    • Set UNIT_PARAMS_OUT.ADDR with the parameter ID of next parameter.

      .... repeat so many times how much parameters you are writing. You need not to write all the parameter but only those changed.....
    • Set UNIT_PARAMS_OUT.VALUE_TYPE on value 1 to finish the configuration.
    • Set UNIT_PARAMS_OUT.VALUE - empty text to finish the configuration.
    • Set UNIT_PARAMS_OUT.ADDR on value 0. It is a signal to send parameters into unit physically.

Table 3

Type of value "UNIT_PARAMS_OUT.VALUE_TYPE" Parameter ID "UNIT_PARAMS_OUT.ADDR" Meaning
1 0 End of configuration.
2 x Parameter of U8 type.
3 x Parameter of I32 type.
4 x Parameter of String type.
It is allowed to use it for all the parameters except for the parameter with ID=0. The user is responsible for the text correctness, KOM process does not check it.
6 x Parameter of U16 type.
8 x Parameter of Float type.
10 x Parameter of U32 type.
11 0 Parameter "Profile Timestamp" - a text with absolute time in the form: "dd-mm-rrrr hh:mi:ss".

Literature


  • Teltonika Codec.14 Communication Protocol Description, Rev.11.

Changes and modifications


  • Sept. 2009 - Document creation

Document revisions


  • Ver. 1.0 – September 30th, 2009
Write a comment…