Difference between revisions of "Help with Server FAQ"

From Wiki Knowledge Base | Teltonika GPS
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page is dedicated to quickly find most commonly faced issues or questions when trying to create an IoT data platform which supports Teltonika Telematics devices.  
+
Here are some tips for solving the most common issues setting up Server.
  
=='''Pre-Requisites for server implementation'''==
+
=='''Data Interpretation'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>What are the pre-requisites for deploying devices on my server?</strong>
+
|<strong>Where can I find a simple and understandable description of the data sent from the device to the server, along with an explanation? I need to understand what the server sees, how it is written, and what the specific values mean.</strong>
 
|-
 
|-
|To develop the platform, below are the requirements:
+
|In the link below you can find a full explanation of the Teltonika protocols with details about Codec 8 and Codec 8 extended protocols, used for data sending, and Codec 12 for sending GPRS commands: https://wiki.teltonika-gps.com/view/Teltonika_Data_Sending_Protocols
{| class="wikitable"
+
Each device I/O parameter has its unique ID, which is called AVL ID. If you want to decode the data easily you can try to use the device Data Sending Parameters ID page to learn about the AVL parameters and how to decode it: https://wiki.teltonika-gps.com/view/FMB920_Teltonika_Data_Sending_Parameters_ID
|+
+
|}
!Requirement
 
!Comment
 
|-
 
|Hardware
 
|A high CPU count promotes better cloud tiering throughout because although object storage can be slow in I/O operations per thread, object storage can support many threads. Any standard x86 64-bit servers can be ideally used.
 
|-
 
|Memory Requirements
 
|Cloud services demand a large amount of memory, which is why the minimum recommended memory size is 8GB.
 
|-
 
|Hard disk
 
|For a medium-sized (up to a 1000 devices) server, 300GB RAID1 disks can be recommended.
 
|-
 
|Database
 
|A database is required to store the records/messages incoming from multiple devices.
 
Further, this data must be assigned to its appropriate device ( recognized by IMEI ). MySQL can be used for the database.
 
|-
 
|Security
 
|Teltonika devices support TLS Encryption which can be implemented.
 
[[How to generate TLS certificates (Windows)?]]
 
|-
 
|Programming Skills
 
|Knowledge about programming language is a must. Teltonika Telematics is a hardware production company, we do not provide software programming services and cannot help with writing code for the server. Only consult on the logic and algorithms of device features and possible issues in data interpretation from the server side.
 
|-
 
|Hardware Knowledge
 
|It can be found on our Teltonika WIKI: https://wiki.teltonika-gps.com/view/Main_Page
 
To understand the devices, their use cases and how they send data.  
 
|-
 
|Protocol Implementation
 
|Teltonika Telematics device protocols need to be implemented for the server to understand and parse the received data correctly.
 
[[Teltonika Data Sending Protocols]]
 
|-
 
|Socket Programming
 
|Sockets and the socket API are used to send messages across a network. For Teltonika devices to make connection to your server, the server needs to have an application socket programmed to accept these connection request.
 
'''Note:'''
 
  
Each socket should be dedicated to one device, this will allow the server to differentiate the devices when more than 1 device is sending data at the same time.
+
=='''Data Functionality/Workflow'''==
 +
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 +
|<strong>After creating my server, I started to receive the same message from the device for multiple times. Should I respond to it? If yes, whats the format of the response?
 +
</strong>
 
|-
 
|-
|Network Considerations
+
|First, when module connects to server, module sends its IMEI. First comes short identifying number of bytes written and then goes IMEI as text (bytes).
|Cloud storage supports storing cold data on a public cloud object storage service,such as Amazon S3. When using a public cloud, the connection is over a WAN.
+
For example, IMEI 356307042441013 would be sent as 000F333536333037303432343431303133. First two bytes denote IMEI length. In this case 0x000F means, that IMEI is 15 bytes long.
|-
 
|Bandwidth Requirements
 
|Bandwidth speed requirements are based on the amount of data transfer per month. It can be calculated using some online tools such as: https://www.calculator.net/bandwidth-calculator.html.
 
|-
 
|IP Address Requirements
 
|Static IP or a dedicated port and domain is required otherwise device configuration would need to be updated constantly with a new IP or a new Port.  
 
|-
 
|}
 
  
 +
After receiving IMEI, server should determine if it would accept data from this module. If yes, server will reply to module 01, if not - 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00. Then module starts to send first AVL data packet. After server receives packet and parses it, server must report to module number of data received as integer (four bytes). If sent data number and reported by server doesn’t match module resends sent data.
 
|}
 
|}
  
 +
=='''Implementation'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>How to open ports in my computer for virtual testing?</strong>
+
|<strong>I tried to implement my server but I couldn’t create a tool to listen to the data sent by the device. Does Teltonika have any tools to help in receiving the packets? And to parse the data received? If yes, where I can find it?</strong>
 
|-
 
|-
|
+
|Yes, Teltonika has a TCP and UDP listeners that makes part of the Teltonika Parser Pack. In the Parser Pack you can also find the Teltonika Parser to decode the data received by the listeners. You can find the download link of the parser pack here: https://wiki.teltonika-gps.com/view/Universal_Device_Test_Guide#Protocols_implementation
The step by step instructions to open a TCP/UDP port can be found here: https://wiki.teltonika-gps.com/view/Opening_TCP/UDP_port
 
 
|}
 
|}
  
 +
=='''Reading Records'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>What ports should i use to keep connection with the server?</strong>
+
|<strong>After implement my own server I started to receive a packet with multiple records, how can I know which record was generated first?
 +
</strong>
 
|-
 
|-
|
+
|When you receive a packet with multiple records in the same Data Packet you can use the Timestamp to know when the record was generated.
Any Non-reserved ports on the server side, which are not being blocked and used by server's firewall and services respectively.
 
 
|}
 
|}
  
 
=='''Documentation'''==
 
=='''Documentation'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>Does Teltonika offer any homologation or server implementation documents which we can use to see how the data is sent, received, and parsed?</strong>
+
|<strong>I want to receive the data generated by the Teltonika device, does Teltonika have any server or service for this purpose? In case not, Are there any recommendations on how to proceed to receive the data?</strong>
 
|-
 
|-
|Regarding the documents/sources, here's what we offer:
+
|As we are a Hardware manufacturer we don’t count on a server or service that you can use to see the data generated by your device. So we can offer different solutions for you to reach your goals. [SP1]
# The wiki link on data sending protocols: https://wiki.teltonika-gps.com/view/Teltonika_Data_Sending_Protocols
+
# You can use an existing Fleet Management platform, a Telematics API Platform, or a Cloud Computing platform. There are a lot of options, but you can find a list with some of the compatible platforms/services here: [[Fleet Management platforms|https://wiki.teltonika-gps.com/view/Fleet_Management_platforms]]
# The parsing toolkit containing the TCP/UDP Listener, source code and other related documents. It can be downloaded from here: https://wiki.teltonika-gps.com/view/Universal_Device_Test_Guide#Protocols_implementation
+
# You can develop your platform to receive and parse the data generated by the device. To develop your platform you should have some knowledge about programming and networks.
 
|}
 
|}
  
 +
=='''PRE-Requisite knowledge/skills'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>What are the supported Network Protocols for Teltonika devices which I need to implement on my server</strong>
+
|<strong>I want to develop a Vehicle Tracking System using your GPS Tracker. So, my question is what are the required knowledge/skills to set up my server for sending/receiving data to the Teltonika tracker? I am confused about how to set up my server to send and receive the data from the device</strong>
 
|-
 
|-
|Currently, the Teltonika devices works with 03 different protocols for Data Sending; TCP, UDP, and MQTT. Please keep a note that MQTT is supported only via AWS server or a custom server which should be implemented based on the AWS protocols. More information on MQTT ( based on AWS ) can be found here: https://wiki.teltonika-gps.com/view/Getting_Started_with_AWS_IoT_Core.
+
|To develop your platform first you must be aware of some sort of information/tech skills, such as device Data Sending Protocols, device data sending parameters, basic concepts of network communications, such as communication protocols, open and test IP and ports and how to parse the data received using source codes or the provide protocols.
 
|}
 
|}
  
 +
=='''Server Requirements/Supported Network Protocols'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>Is there any ID/Value available corresponding to the paramters that Teltonika devices offer? </strong>
+
|<strong>I want to develop a Vehicle Tracking System using your GPS Tracker. So, my question is what are the required knowledge/skills to set up my server for sending/receiving data to the Teltonika tracker? I am confused about how to set up my server to send and receive the data from the device</strong>
 
|-
 
|-
|Yes, there are several parameters that you can get from our devices and the AVL IDs corresponding to each one of them can be found here: https://wiki.teltonika-gps.com/view/FMM130_Teltonika_Data_Sending_Parameters_ID.
+
|Currently, the Teltonika devices works with 03 different protocols for Data Sending; TCP, UDP, and MQTT. You can open a TCP or a UDP port on your PC to receive the data sent by your device. You can make sure that the port is open using external websites like canyouseeme (https://www.canyouseeme.org), port checker (https://portchecker.co/) and others. If you’re unable to open ports, you can use external tools such as ngrok (https://ngrok.com/) to virtually route the ports.
 
|}
 
|}
  
=='''Communication with server'''==
+
=='''Troubleshooting Data'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>How does device communicate with the server?
+
|<strong>I have done the IMEI acknowledgment part by sending 01 to the device upon reception of IMEI. Now, having a bit of difficulty in sending the number of data packets received on the server from the FMX device. What exactly should I do to properly respond to the device?
 
</strong>
 
</strong>
 
|-
 
|-
|First, when module connects to server, module sends its IMEI. First comes short identifying number of bytes written and then goes IMEI as text (bytes).
+
|After receiving the AVL packet from the device you should respond with the number of records is in the packet, which is present in the payload and presented as Number of Data 1 and/ or Number of Data 2.
For example, IMEI 356307042441013 would be sent as 000F333536333037303432343431303133. First two bytes denote IMEI length. In this case 0x000F means, that IMEI is 15 bytes long.
+
Below we have a couple of examples of packets send using the Codec8 and TCP protocols with the proper response:
 +
 
 +
1)   RAW with 01 record:
 +
 
 +
Received data in the hexadecimal stream:
 +
 
 +
000000000000003608010000016B40D8EA30010000000000000000000000000000000
 +
 
 +
105021503010101425E0F01F10000601A014E0000000000000000010000C7CF
 +
 
 +
As the Number of Data 1 and 2 shows the value 1, the server should respond:
 +
 
 +
00000001
  
After receiving IMEI, server should determine if it would accept data from this module. If yes, server will reply to module 01, if not - 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00. Then module starts to send first AVL data packet. After server receives packet and parses it, server must report to module number of data received as integer (four bytes). If sent data number and reported by server doesn't match module resends sent data.
+
2)   RAW with 02 records
|}
 
  
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
+
Received data in the hexadecimal stream:
|<strong>How to setup records sorting from protocols Codec? </strong>
 
|-
 
|Records can be sorted by using timestamp as a record sorting method, as it allows us to know what record was received early.
 
|}
 
  
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
+
000000000000004308020000016B40D57B48010000000000000000000000000000000
|<strong>How to setup the answer to the Codec protocols in C#, Java, C++ from the server side, while counting records?</strong>
 
|-
 
|You can write script in your preferred language ( C#, JAVA or Python ) which can extract the number of records received from device and send it as a ACK packet to the device.
 
|}
 
  
=='''Troubleshooting Data'''==
+
1010101000000000000016B40D5C198010000000000000000000000000000000 101010101000000020000252C
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
|<strong>How to know if the device is sending the data to server or not? And how to know if the server is accepting the data from device or not?
 
</strong>
 
|-
 
|
 
#We can always check the Device Status->GSM info page on the Teltonika Configurator. If device' GPRS status is "Activated" and  Sent Records count is above zero and the Sent Records count is increasing that means device is sending data to the server. Thereafter, the server has to accept the data and send back response.
 
#If the server has the Codec 8 protocol integerated properly, it will send the response in HEX as number of records received by server. On Teltonika Configurator under Status->GSM info, we can check the "Received Data", Socket and Last server Response time to confirm when was the last connection happened with server and its response hour.
 
|}
 
  
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
+
As the Number of Data 1 and 2 shows the value 2, the server should respond:
|<strong>How to make multiple session separation from the server side from different devices?</strong>
 
|-
 
|Multiple devices can be separated by recognizing the IMEIs of the devices on the server side. The very first step by the device is to send the IMEI on the server and server receives IMEI and sends ACK packet back to the module. All the modules have different IMEI which can be used as a point of differenciation.
 
|}
 
  
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
+
00000002
|<strong>How can we know if the acknowledgment is required on the server or not? Can we change this setting?</strong>
 
|-
 
|Acknowledgment is made depending upon the "Record Settings":
 
#If ACK Type, TCP/IP is selected then Server Acknowledgement is not required
 
#If ACK Type, AVL is selected then the Server must respond with the Acknowledgement.
 
 
|}
 
|}
  
 
=='''Common Mistakes'''==
 
=='''Common Mistakes'''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
|<strong>I am getting the error on the server side saying"Protocol Mismatch". What could possible be wrong in this case?</strong>
+
|<strong>I’m using the Parser tools to decode the records sent by the device to my server but the Parser says “ Corrupted Data Inserted”. What should I’m doing wrong?</strong>
|-
 
|This is because of mismatch in the selection of Network Protocol on the device and server side. It is possible that on the Device, TCP is selected and on the server side its UDP or vice-versa. Since the structure for both the protocols is different, this mismatch can restrict establishing a connection on the server.
 
|}
 
 
 
=='''Communication over GPRS '''==
 
{| class="wikitable mw-collapsible mw-collapsed" role="presentation"
 
|<strong>How can my device communicate over GPRS messages?</strong>
 
 
|-
 
|-
|We have few CODEC protocols supporting GPRS communication: Codec 12,13,14,15. However the functionality basics remains the same and is explained below for Codec 12.
+
|First, be sure that you're trying to decode using the proper protocol. I mean, if you configured the device to send messages using UDP to your server you must select UDP in the Parser, if you set the device to send the records using the TCP Protocol you must select the TCP in Parser.
#First, the Teltonika device opens the GPRS session and sends AVL data to the server (refer to device protocols).
 
#Once all records are sent and the correct sent data array acknowledgment is received by the device then GPRS commands in Hex can be sent to the device.
 
#The ACK (acknowledgment of IMEI from server) is a one-byte constant 0x01. The acknowledgment of each data array sent from the device is four bytes integer – a number of received records.
 
Detailed information on the protocol can be found here: https://wiki.teltonika-gps.com/view/Teltonika_Data_Sending_Protocols#Codec_12
 
 
|}
 
|}
  

Revision as of 20:52, 5 February 2024

Here are some tips for solving the most common issues setting up Server.

Data Interpretation

Data Functionality/Workflow

Implementation

Reading Records

Documentation

PRE-Requisite knowledge/skills

Server Requirements/Supported Network Protocols

Troubleshooting Data

Common Mistakes

RAW Data Example