DIY: Create a Tracker

with a Raspberry Pi and an NMEA gateway


Raspberry Pi Python Linux GPS WiFi TCP UDP

This guide explains how to build your own Trakkit.org live tracker using a Raspberry Pi or any Linux system.

Compatible systems include:

  • Raspberry Pi OS
  • Ubuntu
  • Debian

  • For this guide, we use an NMEA multiplexer such as the ShipModul Miniplex or a similar gateway.

Table of Contents


Overview

The process is simple:

  1. Prepare your configuration on Trakkit.org
  2. Install Raspberry Pi OS
  3. Install Joli_Compagnon
  4. Test the tracker
  5. Automate startup

⚓ - Configure your boat on Trakkit.org

Before installing anything on the Raspberry Pi, declare your tracker on Trakkit.org.

  1. Create your Boat
  2. Create a Tag
    (give it a recognizable name)
  3. Create a password for this Tag
  4. Create a Track with:
    • Start date: 01/01/2020
    • End date: 01/01/2050
  5. Mark this track as LiveTrack

You must have available:

TAG
TAG PASSWORD

These credentials will be used by the tracker.


🍓 - Install Raspberry Pi OS

Install Raspberry Pi OS normally on your SD card.

Follow the official instructions:

https://www.raspberrypi.com/software

There is no special configuration required.

You can choose the Desktop version, easier to configure, or Lite version if you are comfortable with Linux.


⚙️ — Basic system configuration

At first boot:

  1. Create a user (In this guide we assume the username pi)
  2. Configure normally:
    • language
    • keyboard
    • network (Wifi to access the Internet)

It is recommended to set the timezone to UTC.


🛰️ — WiFi or LAN Connection to NMEA Gateway

Depending on the connection type (WiFi or LAN) of your NMEA gateway, obtain the following information from the manufacturer:

  • IP address
  • Port
  • Protocol (UDP or TCP)

If you are using WiFi and your NMEA gateway is not accessible on the same network as your main Internet connection, you may need to configure a second WiFi interface on your Raspberry Pi using an additional USB WiFi dongle.

This allows you to: - receive the NMEA data stream (incoming route) - send position data to Trakkit.org (outgoing route)

Typically, the configuration looks like:

IP: 10.0.0.1
Port: 10110
Protocol: TCP

These values must be configured in the config.ini file.


📦 — Install Joli_Compagnon

Download the software from the Trakkit website:

Trakkit.org → About → Download

Download the file:

joli_compagnon.tgz

Extract it in your home directory:

tar -xzf joli_compagnon.tgz

This creates the directory: joli_compagnon_last which contains all the scripts.


🐍 — Create the Python virtual environment

Move into the directory:

cd joli_compagnon_last

Create the Python virtual environment:

python3 -m venv venv

Activate it:

source venv/bin/activate

Install the required modules:

pip install -r requirements.txt

🔁 — Manual launch of the tracker

Activate the Python virtual environment:

source venv/bin/activate

Rename the configuration file:

mv config.ini.EXAMPLE config.ini

Edit the file:

nano config.ini

Configure your Trakkit credentials:

###############################################
# 🔑 Your Trakkit.org login credentials
###############################################
[USER]
TAG = YOUR_TAG_HERE
PWD = YOUR_TAG_PASSWORD_HERE

Then configure the NMEA section using the values previously defined to access your NMEA gateway:

###############################################
# 📡 Data source from NMEA multiplexer
###############################################
[NMEA]
NMEA_SRV = 10.0.0.1
NMEA_PORT = 10110

Start the NMEA reader according to the protocol used
(only one process must be running):

./reader_tcp.py

OR

./reader_udp.py

You should see NMEA frames displayed.

Start the sender in another terminal:

./sender.py

This script sends the GPS positions to Trakkit.org.

Wait a few minutes.

Your boat position should now appear on Trakkit.org.


🚀 - Automate startup with systemd

At this point, you now have a fully functional tracker for Trakkit.org. The final step is to configure it to start automatically at boot.

For the remainder of this guide, we assume using TCP protocol, the username pi and the following installation path:

/home/pi/joli_compagnon_last/

Scripts and virtual environment are located there.


Service for the NMEA reader

Create:

sudo nano /etc/systemd/system/trakkit_reader.service
[Unit]
Description=Trakkit.org Companion NMEA Reader
After=network.target

[Service]
User=pi
WorkingDirectory=/home/pi/joli_compagnon_last
ExecStart=/home/pi/joli_compagnon_last/venv/bin/python reader_tcp.py
Restart=always

[Install]
WantedBy=multi-user.target

Service for the sender

Create:

sudo nano /etc/systemd/system/trakkit_sender.service
[Unit]
Description=Trakkit.org Companion Sender
After=trakkit_reader.service

[Service]
User=pi
WorkingDirectory=/home/pi/joli_compagnon_last
ExecStart=/home/pi/joli_compagnon_last/venv/bin/python sender.py
Restart=always

[Install]
WantedBy=multi-user.target

Enable the services

sudo systemctl daemon-reload
sudo systemctl enable trakkit_reader
sudo systemctl enable trakkit_sender

Start them:

sudo systemctl start trakkit_reader
sudo systemctl start trakkit_sender

Your Trakkit.org Companion will now start automatically at boot, connect to your NMEA gataway, and send your boat position continuously.