<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Sá</title>
    <description>The latest articles on DEV Community by Daniel Sá (@danieljvsa).</description>
    <link>https://dev.to/danieljvsa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2968130%2Fa62ea6ac-8456-47a3-956f-42df9eb16fd6.png</url>
      <title>DEV Community: Daniel Sá</title>
      <link>https://dev.to/danieljvsa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danieljvsa"/>
    <language>en</language>
    <item>
      <title>Introducing teltonika-go: A Go Package for Parsing and Communicating with Teltonika Devices</title>
      <dc:creator>Daniel Sá</dc:creator>
      <pubDate>Thu, 12 Jun 2025 13:40:53 +0000</pubDate>
      <link>https://dev.to/danieljvsa/introducing-teltonika-go-a-go-package-for-parsing-and-communicating-with-teltonika-devices-4oof</link>
      <guid>https://dev.to/danieljvsa/introducing-teltonika-go-a-go-package-for-parsing-and-communicating-with-teltonika-devices-4oof</guid>
      <description>&lt;p&gt;If you've ever worked with Teltonika GPS tracking devices, you know that parsing their proprietary protocol can be a bit of a challenge. Whether you're building a fleet management system, a custom IoT platform, or just tinkering with real-time vehicle telemetry, understanding and communicating with these devices is critical.&lt;/p&gt;

&lt;p&gt;That's why I created teltonika-go — an open-source Go package that simplifies parsing Teltonika messages and enables communication with their devices over TCP.&lt;/p&gt;

&lt;h3&gt;
  
  
  📦 What is teltonika-go?
&lt;/h3&gt;

&lt;p&gt;teltonika-go is a lightweight, idiomatic Go library designed to help developers decode, parse, and interpret the binary protocol used by Teltonika GPS trackers like the FMB series. It provides building blocks for server-side communication with these devices, which typically send AVL (Automatic Vehicle Location) data over TCP.&lt;/p&gt;

&lt;p&gt;With teltonika-go, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read and parse AVL packets sent by devices&lt;/li&gt;
&lt;li&gt;Understand GPS, IO, and timestamp data&lt;/li&gt;
&lt;li&gt;Handle device handshakes and codec types (including Codec8, Codec8 Extended and Codec16)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Build your own custom server or integrate Teltonika device communication into an existing Go application&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Why Use It?
&lt;/h3&gt;

&lt;p&gt;Teltonika devices are widely used in the GPS tracking industry, but documentation is limited and most of it is not tailored to developers. If you're a Go developer, teltonika-go provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A clean and idiomatic API&lt;/li&gt;
&lt;li&gt;No external dependencies (other than the Go standard library)&lt;/li&gt;
&lt;li&gt;Open-source flexibility (MIT License)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔧 Getting Started
&lt;/h3&gt;

&lt;p&gt;Install the package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go get github.com/danieljvsa/teltonika-go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example: Parse a TCP packet from a Teltonika FMB device.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main

import (
    "fmt"
    pkg "github.com/danieljvsa/teltonika-go/pkg" //for general functions
    tools "github.com/danieljvsa/teltonika-go/tools" //for functions that used in package to help in case only want to decode specific tram code
)

func main() {
    // example binary data from a Teltonika device
    rawLogin := []byte{ /* login packet */ }
    rawTram := []byte{ /* AVL packet */ }

    // Decode login packet
    login := pkg.LoginDecoder(rawLogin)
    if login.Error != nil {
        fmt.Println("Login decode error:", login.Error)
    } else {
        fmt.Printf("Login decoded: %+v\n", login.Response)
    }

    // Decode AVL/tram packet
    tram := pkg.TramDecoder(rawTram)
    if tram.Error != nil {
        fmt.Println("Tram decode error:", tram.Error)
    } else {
        fmt.Printf("Tram decoded: %+v\n", tram.Response)
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🧱 Project Structure
&lt;/h3&gt;

&lt;p&gt;The project is still in its early stages, but currently supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decode login packets&lt;/li&gt;
&lt;li&gt;Parse AVL records using Codecs 08, 8E and 16&lt;/li&gt;
&lt;li&gt;Validate and interpret Teltonika TCP/UDP headers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to check out the repo: &lt;a href="https://github.com/danieljvsa/teltonika-go" rel="noopener noreferrer"&gt;https://github.com/danieljvsa/teltonika-go&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🚧 Roadmap
&lt;/h3&gt;

&lt;p&gt;The project is under active development, and here are some features on the horizon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full support for Codec 12 and Codec 14&lt;/li&gt;
&lt;li&gt;Full support for encoding for commands with codecs 12, 13, 14, 15.&lt;/li&gt;
&lt;li&gt;Tools to send commands to devices (e.g., engine cut-off, configuration updates)&lt;/li&gt;
&lt;li&gt;Improved error handling and documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're working with Teltonika devices and using Go, I'd love your feedback and contributions!&lt;/p&gt;

&lt;h4&gt;
  
  
  🤝 Contributing
&lt;/h4&gt;

&lt;p&gt;Contributions are welcome! If you find a bug, have a feature request, or just want to improve the code, feel free to open an issue or a pull request.&lt;/p&gt;

&lt;h4&gt;
  
  
  🙌 Final Thoughts
&lt;/h4&gt;

&lt;p&gt;Parsing Teltonika’s binary protocol doesn’t need to be a pain. With teltonika-go, you can start building robust applications that speak Teltonika's language — all in idiomatic Go.&lt;/p&gt;

&lt;h4&gt;
  
  
  👉 Check out the project on GitHub: danieljvsa/teltonika-go
&lt;/h4&gt;

&lt;p&gt;⭐ Star it if you find it useful, and let's make working with Teltonika devices easier together!&lt;/p&gt;

&lt;p&gt;Source code: &lt;a href="https://github.com/danieljvsa/teltonika-go" rel="noopener noreferrer"&gt;https://github.com/danieljvsa/teltonika-go&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>opensource</category>
      <category>gps</category>
      <category>teltonika</category>
    </item>
  </channel>
</rss>
