03 - RouteTrack Pi — gpsd Installation & GPS Validation

Date: December 24th, 2025
Category: Raspberry Pi / GPS / Linux Services
Backlink: RouteTrack Pi — Connecting GPS Hardware


Goal

This page covers:

Device: GlobalSat BU‑353N USB GPS Receiver


Install gpsd + tools

Run:

sudo apt update
sudo apt install -y gpsd gpsd-clients

This installs:


Confirm the GPS receiver is detected

Plug in the USB GPS receiver, then verify the device appears:

ls -l /dev/ttyUSB*

example:

image.png

Linux sees the GPS receiver.


Validate raw NMEA output from the GPS

Before involving gpsd, verify the GPS is actually transmitting:

sudo stty -F /dev/ttyUSB0 4800 cs8 -cstopb -parenb -ixon -ixoff -crtscts -echo
sudo timeout 8 cat /dev/ttyUSB0 | head -n 20

Expected output should look like:

$GPGGA,...
$GPGSA,...
$GPRMC,...

If you see NMEA sentences, the receiver is working at 4800 baud.


Create a stable GPS symlink /dev/gps0 (udev rule)

The GPS device may sometimes appear as a different tty device, so we create a stable symlink called /dev/gps0.

Create the udev rule

sudo nano /etc/udev/rules.d/10-gps-pl2303.rules

Paste:

SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", SYMLINK+="gps0"

These id's come from udev's info:

Reload udev and trigger:

sudo udevadm control --reload-rules
sudo udevadm trigger
sudo udevadm settle

Verify:

ls -l /dev/gps0

Expected:

image.png


Disable gpsd.socket and build a standalone gpsd service

Socket activation can cause inconsistent behavior during testing, so this project uses a dedicated standalone systemd service.

Disable/mask the socket unit

sudo systemctl disable --now gpsd.socket
sudo systemctl mask gpsd.socket

Create gpsd-standalone.service

Create the service:

sudo nano /etc/systemd/system/gpsd-standalone.service

This is the code for setting up the new service:

[Unit]
Description=GPSD Standalone (RouteTrack)
After=network.target
Wants=network.target

[Service]
Type=simple
User=gpsd
Group=dialout
ExecStart=/usr/sbin/gpsd -N -n -b -s 4800 -S 2947 /dev/gps0
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target

Important Notes

Enable + start:

sudo systemctl daemon-reload
sudo systemctl enable --now gpsd-standalone.service

Check status:

systemctl status gpsd-standalone.service --no-pager -l

Notice it is enabled, active and running the line from the ExecStart:

image.png


Confirm gpsd is listening on port 2947

Run:

ss -ltnp | grep 2947

It is listening on ipv4 and ipv6 ports:

image.png


Validate GPS data through gpsd (JSON output)

Run:

gpspipe -w -n 25

✅ Expected:

Example indicators showing some GPS coordinates:

image.png


Verifying Satellites and that everything is working:

use:

cgps

image.png

Next Steps

The GPS subsystem is now stable, validated, and running as a dedicated systemd service. Upcoming work will build on this foundation:



Revision #6
Created 24 December 2025 23:05:21 by Nate Nash
Updated 25 December 2025 18:15:28 by Nate Nash