DIY: Create a Tracker
with a Raspberry Pi and a USB GPS receiver
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 a BU-355N5 USB GPS receiver — Affordable, widely used, and fully compatible.
Table of Contents
- Overview
- Configure your boat on Trakkit.org
- Install Raspberry Pi OS
- Basic system configuration
- GPS connection and test
- Install Joli_Compagnon
- Create the Python virtual environment
- Manual launch of the tracker
- Automate startup with systemd
Overview
The process is simple:
- Prepare your configuration on Trakkit.org
- Install Raspberry Pi OS
- Install Joli_Compagnon
- Test the tracker
- Automate startup
⚓ - Configure your boat on Trakkit.org
Before installing anything on the Raspberry Pi, declare your tracker on Trakkit.org.
- Create your Boat
- Create a Tag
(give it a recognizable name) - Create a password for this Tag
- Create a Track with:
- Start date: 01/01/2020
- End date: 01/01/2050
- 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:
- Create a user (In this guide we assume the username pi)
- Configure normally:
- language
- keyboard
- network (Wifi to access the Internet)
It is recommended to set the timezone to UTC.
🛰️ — GPS connection and test
We will use a widely available BU-353N5 USB GPS
Connect the GPS to the Raspberry Pi and verify that it is detected.
List the USB devices:
lsusb
Example output:
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. USB-Serial Controller
Bus 001 Device 003: ID 0424:9514 Microchip Technology Hub Controller
Bus 001 Device 002: ID 0424:ec00 Microchip Technology SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The BU-353N5 GPS typically appears as a USB-to-serial adapter (often using a Prolific or similar chipset).
Identify the serial device
The GPS will create a serial device, usually:
/dev/ttyUSB0
To verify it, run:
dmesg | grep tty
Example output:
[ 123.456789] usb 1-1.2: pl2303 converter now attached to ttyUSB0
This confirms that the GPS is available on:
/dev/ttyUSB0
Verify permissions
Check that the device exists:
ls -l /dev/ttyUSB*
Example:
crw-rw---- 1 root dialout 188, 0 Apr 21 12:34 /dev/ttyUSB0
If needed, ensure your user belongs to the dialout group:
sudo usermod -a -G dialout $USER
Then log out and log in again.
Test GPS data reception
NMEA GPS devices typically use 4800 baud by default.
Display the incoming NMEA sentences:
cat /dev/ttyUSB0
If NMEA sentences scroll continuously, the GPS is working correctly.
If nothing appears, the GPS may be using a different serial speed.
You can manually change the baud rate of the device and test again.
Common NMEA speeds are:
4800
9600
38400
To change the speed of the serial device, use stty.
Example for 4800 baud:
stty -F /dev/ttyUSB0 4800
Then test again:
cat /dev/ttyUSB0
If nothing appears, try another speed.
Example for 9600 baud:
stty -F /dev/ttyUSB0 9600
cat /dev/ttyUSB0
Once the correct speed is found, you should see NMEA sentences such as:
$GPRMC,184551.00,A,4250.5589,N,07059.3421,W,0.13,309.62,210424,,,A*6C
$GPGGA,184551.00,4250.5589,N,07059.3421,W,1,10,0.8,12.3,M,-33.9,M,,*5A
Once NMEA sentences are visible, note:
- the device path (usually
/dev/ttyUSB0) - the baud rate (for example
4800)
These values will be used later 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 the GPS section:
###############################################
# 🛰️ Data source from USB GPS device
###############################################
[GPS]
GPS_PORT = /dev/ttyUSB0
GPS_BAUDS = 4800
Then configure your Trakkit credentials:
###############################################
# 🔑 Your Trakkit.org login credentials
###############################################
[USER]
TAG = YOUR_TAG_HERE
PWD = YOUR_TAG_PASSWORD_HERE
Start the GPS reader:
./reader_usb.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 the username pi and the following installation path:
/home/pi/joli_compagnon_last/
Scripts and virtual environment are located there.
Service for the GPS reader
Create:
sudo nano /etc/systemd/system/trakkit_reader.service
[Unit]
Description=Trakkit.org Companion GPS Reader
After=network.target
[Service]
User=pi
WorkingDirectory=/home/pi/joli_compagnon_last
ExecStart=/home/pi/joli_compagnon_last/venv/bin/python reader_usb.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 and send your boat position continuously.