Is there a way to emulate/simulate Teltonika FMx devices for testing backend server?

Hi everyone,

My team and I are working on a new tracking system for renting domain. We are using Teltonika FMx devices and wanted to ask if there are any recommended ways to simulate or emulate device data without using physical hardware.

We often struggle to properly test our server, even when we have access to devices, as it’s difficult to generate consistent, real-looking data. In addition, vehicles in our fleet are frequently offline for extended periods, which makes our testing challenging.

Is there any tool, simulator, or recommended approach for emulating Codec AVL data or GPS device behaviour for testing purposes?

Any guidance would be appreciated.

Ask AI to make it.

Example: (in this case I have a html page to initiate the test).

<?php
// KONFIGURATION - Ret disse til din server
$server_ip = "";
$server_port = 6991;
$imei = "12345678";  //aktiv
// 1. Modtag data fra browseren
$input = json_decode(file_get_contents('php://input'), true);
if (!$input) die("Ingen data modtaget");
$lat = $input\['lat'\];
$lon = $input\['lon'\];
$alt = $input\['alt'\];
$speed = $input\['speed'\];
$angle = $input\['angle'\];
// 2. Forbered binære data (Codec 8 format)
$timestamp = floor(microtime(true) \* 1000); // Millisekunder
// AVL Data start
$avl_data = pack("J", $timestamp); // Timestamp (8 bytes)
$avl_data .= pack("C", 0x00);      // Priority (1 byte)
$avl_data .= pack("N", (int)($lon \* 10000000)); // Longitude (4 bytes)
$avl_data .= pack("N", (int)($lat \* 10000000)); // Latitude (4 bytes)
$avl_data .= pack("n", (int)$alt);   // Altitude (2 bytes)
$avl_data .= pack("n", (int)$angle); // Angle (2 bytes)
$avl_data .= pack("C", 0x07);        // Satellites (1 byte)
$avl_data .= pack("n", (int)$speed); // Speed (2 bytes)
// IO Data (Vi emulerer dine værdier)
$avl_data .= pack("C", 0x00); // Event ID (0 = none)
$avl_data .= pack("C", 0x05); // Total IO Count (5 stk)
// 1-byte IOs (239=Ignition, 240=Movement, 21=GSM)
$avl_data .= pack("C", 3); // Antal 1-byte
$avl_data .= pack("C", 239) . pack("C", 0); // Ignition off
$avl_data .= pack("C", 240) . pack("C", 0); // Movement off
$avl_data .= pack("C", 21)  . pack("C", 4); // GSM signal 4
// 2-byte IOs (66=Ext Voltage, 67=Battery)
$avl_data .= pack("C", 2); // Antal 2-byte
$avl_data .= pack("C", 66) . pack("n", 0);    // Ext Voltage 0
$avl_data .= pack("C", 67) . pack("n", 3701); // Battery 3.7V
// 4-byte IOs (0 stk)
$avl_data .= pack("C", 0);
// 8-byte IOs (0 stk)
$avl_data .= pack("C", 0);
// Pak hele AVL pakken ind
$full_package = pack("C", 0x08); // Codec ID
$full_package .= pack("C", 0x01); // Record Count
$full_package .= $avl_data;
$full_package .= pack("C", 0x01); // Record Count Again
// Beregn CRC-16 (Teltonika bruger IBM/A001)
function teltonika_crc16($data) {
    $crc = 0x0000;
    for ($i = 0; $i < strlen($data); $i++) {
        $crc ^= ord($data\[$i\]);
        for ($j = 0; $j < 8; $j++) {
            if ($crc & 0x0001) $crc = ($crc >> 1) ^ 0xA001;
            else $crc >>= 1;
        }
    }
    return $crc;
}
$crc = teltonika_crc16($full_package);
$data_len = strlen($full_package);
// Den endelige TCP ramme
$tcp_frame = pack("N", 0x00000000); // Preamble
$tcp_frame .= pack("N", $data_len); // Længde
$tcp_frame .= $full_package;
$tcp_frame .= pack("N", $crc); // CRC (4 bytes i TCP)
// 3. Send til serveren via Socket
$socket = fsockopen($server_ip, $server_port, $errno, $errstr, 5);
if (!$socket) {
    die("Kunne ikke forbinde til server: $errstr");
}
// A. Send IMEI
$imei_packet = pack("n", strlen($imei)) . $imei;
fwrite($socket, $imei_packet);
$response = fread($socket, 1);
if (ord($response) !== 0x01) {
    die("Server afviste IMEI");
}
// B. Send AVL Data
fwrite($socket, $tcp_frame);
$ack = fread($socket, 4); // Server svarer med 4-byte record count
fclose($socket);
echo "Succes! Server modtog data. ACK: " . bin2hex($ack);


Hey @KryszNow @frjd, you might want to check out this service. It’s a relatively new platform for emulating Teltonika GPS devices.

I’ve been using it myself for development and stress testing, and it’s been really useful so far. We mostly use it for our dev environment, so our devs and QA team can properly test everything.

Thanks for the reply, will keep that in mind. I am not really a tech person, but I think I can ask one of my engineers to do that. Thanks!

I will check it out too, thanks!