Skip to main content
GNSS Documentation
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

GPSD Integration

The library can forward NMEA sentences (GGA, RMC, GSA, GSV, ZDA) to a virtual serial port for gpsd.

Methods

1. Library NMEA Forwarding (SPI HATs)

hat->startForwardForGpsd();
printf("gpsd device: %s\n", hat->getGpsdDevicePath().c_str());

while (running)
{
    auto nav = hat->waitAndGetFreshNavigation();
}

hat->stopForwardForGpsd();
hat.start_forward_for_gpsd()
print(f"gpsd device: {hat.get_gpsd_device_path()}")

while running:
    nav = hat.wait_and_get_fresh_navigation()

hat.stop_forward_for_gpsd()

2. Direct UART (TIME HAT only)

The TIME HAT outputs NMEA natively on /dev/ttyAMA0. gpsd can read it directly — no library needed.

3. USB (L1 HAT & RTK HAT)

Plug a USB cable from the HAT to the Pi — the module appears as /dev/ttyACM0. gpsd reads it directly.

Note
USB Shortcut — USB is the simplest way to get gpsd running on the L1 and RTK HATs. No bridge daemon, no library needed. Just DEVICES="/dev/ttyACM0" in gpsd config.

Bridge Daemon

For production use, the jpgnss2gpsd-bridge systemd daemon creates /dev/jimmypaputto/gnss at boot. See GPSD Daemon Guide.