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 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.
| Not Allowed Both Line & Station | 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 |
Parameter writing
The following rules hold:
- The values of parameters can be only written, not read.
- 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 start).
After the parameters were written, the value UNIT_STAT.ST_CONFIG_TIMESTAMP must be set on the value of the parameter with ID=0 sent by the user. - 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 the 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 the next parameter.
- Set UNIT_PARAMS_OUT.ADDR with the parameter ID of next parameter.
.... repeat as many times as many parameters you are writing. You need not write all the parameters but only those changed..... - Set UNIT_PARAMS_OUT.VALUE_TYPE to value 1 to finish the configuration.
- Set UNIT_PARAMS_OUT.VALUE - empty text to finish the configuration.
- Set UNIT_PARAMS_OUT.ADDR to value 0. It is a signal to send parameters into the 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, the 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
Related pages:
0 komentárov