Hello all,
Please, I am new to Teltonika devices, and I wish to know how to connect my device to my local server to receive signals and readings from the device.
Please help me with a step-by-step guide or an example of what has previously worked.
Teltonika Configurator software (download from Teltonika Wiki)
USB cable or Bluetooth connection to configure the device
Local server with a public IP address or domain name
Port forwarding configured on your router (if server is behind NAT)
Step 1: Prepare Your Device
Insert SIM Card: Insert Micro-SIM card as shown with PIN request disabled
Connect Battery: If your device has an internal battery, connect it
Power Up: Power-up FMB920 with DC voltage 6-30 V power supply using power cable. LED’s should start blinking
Connect to PC: Connect device to your computer via USB cable or Bluetooth
Step 2: Install and Open Configurator
Download and install the Teltonika Configurator for your device model
Install COM port drivers if prompted
Open the Configurator application
Connect to your device (it should auto-detect via USB or Bluetooth)
Click “Load from device” to retrieve the current configuration
Step 3: Configure APN Settings (GPRS Connection)
Navigate to GPRS Settings in the Configurator:
Enable GPRS Context: Make sure GPRS is enabled
APN Configuration:
Access point name, a mandatory parameter which is used to connect to the internet (GPRS). Access Point Name is the name of a gateway between a mobile operator and the public internet. It can be obtained from your SIM card provider
Note: Some operators use a specific type of authentication for GPRS sessions – CHAP or PAP. If any of these is used, APN should be entered as “chap:” or “pap:” respectively e.g. if the operator is using APN “internet” with CHAP authentication, it should be entered as “chap: internet”. Information about APN and authentication type should be provided by your GSM operator
Step 4: Configure Server Settings
In the GPRS Settings section, configure your server connection:
First Server Settings:
Domain (Parameter ID 2004):
Server or Domain adress, can be written either IP address or Domain
Enter your local server IP address (e.g., 192.168.1.100) or domain name (e.g., myserver.example.com)
Important: If using a local server, ensure it has a public IP or use a service like DynDNS
Port (Parameter ID 2005):
Enter your server port (common ports: 5027, 12050, or your custom port)
Example: 5027
Protocol (Parameter ID 2006):
Defines GPRS data transport protocol, used for data transfers – TCP or UDP. From the device side TCP and UDP work almost the same, only difference is that UDP doesn’t need additional confirmation from the server side, that the data packet was received. TCP has that, and uses more network data for the confirmation. The desired data transfer protocol can be selected through the configurator
Recommended: Select TCP for reliable data transmission
TLS Encryption (Optional):
An additional option is the use of TLS encryption for sending records to the main server and backup server
Set to None (0) for basic setup, or enable if your server supports TLS
Step 5: Configure Data Protocol
Navigate to System Settings or Data Protocol:
Select Data Protocol:
Choose Codec 8 or Codec 8 Extended (recommended for more parameters)
Codec8 – a main FM device protocol that is used for sending data to server
Codec8 Extended is used for FMBXXX family devices. This protocol looks familiar to Codec8 but they have some differences
Step 6: Configure Data Acquisition Settings
Navigate to Data Acquisition settings:
Records Sending:
Can be set either Newest or Oldest. For example if the Oldest is marked the device first will send the Oldest information, if Newest then Device will send the newest information
Recommended: Select Oldest for chronological data
Send Period: Set how often the device sends data (e.g., every 30 seconds, 60 seconds)
Min Saved Records: Set to 1 for real-time data transmission
Open Link Timeout: Set to 3600 seconds (1 hour) to keep connection alive
Network Ping Timeout:
Enables network ping after timeout to prevent link close by operator. For example, if the operator closes the active link after 15 minutes when no data is sent, you can set the “network ping” timeout to 10 minutes then the device sends a 0xFF byte to server to keep the link open. Network Ping Timeout should be always lower than Open Link Timeout
Set to 300 seconds (5 minutes)
Step 7: Configure Time Synchronization
Important: default device configuration is to store/send records “after time sync”. Time can be synchronized using GNSS signal or NTP server
Options:
Wait for GPS fix (device will sync time from satellites)
Configure NTP server in System Settings
Or change “Records Saving/Sending Without TS” to Always (only when implementing solution in real world use its not recommended unless time is not important for your usecase)
Step 8: Save Configuration and Test
Click “Save to device” in the Configurator
Wait for confirmation that settings were saved
Step 9: Set Up Your Local Server
Your server needs to:
A. Listen for TCP Connections
Create a TCP/UDP server that listens on the port you configured (e.g., 5027)
B. Implement Teltonika Protocol
Connection Flow:
Device sends IMEI:
the device will send you the IMEI. you have to answer with 0x01
Server must respond: 0x01 (1 byte) to accept connection
Device sends data packets:
Preamble – the packet starts with four zero bytes. Data Field Length – size is calculated starting from Codec ID to Number of Data 2. Codec ID – in Codec8 it is always 0x08. Number of Data 1 – a number that defines how many records are in the packet
you have to send the ACK (4 bytes with the number of avl records received, e.g. 0x00000001) number has to reflect how many records server have recieved in this ecample 1 record recieved so answer is 0x00000001 if 2 records- 0x00000002 and so on
Send 4 bytes containing the number of records received
C. Parse the Data
You can:
Use existing parsers:
Codec 8 documentation can found via URL bellow: https://wiki.teltonika-gps.com/view/Codec · Server - Device communication must work but not yet tested - works … TCP communaction - done! Codec 8 Extended structure parsing - done! Codec 8 structure parsing - done!
GitHub repositories available for various languages (Python, Node.js, Go, Java)