Teltonika Codec14

Teltonika Codec14

Teltonika Codec14 communication protocol

Supported device types and versions


The communication protocol Teltonika Codec14 supports data acquisition from the "Fleet Management Systems Unit" Teltonika devices of type FM4200 with firmware by Movys.
The protocol represents a TCP server to which the units are being connected online. The data come into the system via configuration of the so-called "master" station and I/O tags. I.e. whatever number of connected units send data to the 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 or (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

A 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 debugging information about received values.

YES/NO

NO

Debug Packet Queue Flow

Activation of debugging information about the state of received data processing by D2000 System.

YES/NO

NO

Debug Packet Binary Contents

Enabling of debug listings containing the received/sent datagrams in binary form.

YES/NO

YES

Unit Debug File

Enabling of a special form of tracing the units when the debug information is saved into a special file. The name of this file is derived from the IP address of the unit (IP1_IP2_IP3_IP4.log) in the "trace" subdirectory of the 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 the 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 like 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 the received record and that they are ready to be processed.

Ci

HND.TRIG_ACC

Message handshaking - acknowledges that data was processed by the application. It is executed by the writing of value HND.TRIG and signalizes that the 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 the system yet.

Ci

STAT.RD_TASKS_NR

Global Statistic - number of received threads.

 

STAT.VIRT_ST_NR

Global Statistic - the actual number of connected units with a unique IMEI.

 

UNIT_DATA.IMEI

Unit data - IMEI unit which data was received from.

TxtI

UNIT_DATA.DTIME

Unit data - timestamp of received data. The timestamp of the 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 - the value of the received events number EvNr. More detailed information on the events is mentioned in the 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 the 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 IMEI value is written into this I/O tag, a request to restart the unit with this IMEI is sent. If the writing failed, the unit is not connected.

TxtO

UNIT_MONITORING.IMEI

Unit monitoring request - when the IMEI value is written into this I/O tag, the request to monitor the unit with this IMEI is sent. If the writing failed, the unit is not connected.

TxtO

UNIT_ASYNCMESS.IMEI

Async message request - when the IMEI value is written into this I/O tag, a request to receive the asynchronous info from the unit with this IMEI is sent. If the writing failed, the unit is not connected.

TxtO

UNIT_DEBUG.IMEI

Unit debug request - when the IMEI value is written into this I/O tag, a  request to receive the debug info from the unit with this IMEI is sent. The unit will respond by sending UNIT_DEBUG.DbgNr values. If the writing failed, the unit is not 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 - the value of the written parameter.

TxtO

UNIT_PARAMS_OUT.VALUE_TYPE

Unit parameters write messaging - the value type of the written parameter.

Co