[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get gpsfake/gpsd to work together

From: Gary E. Miller
Subject: Re: Can't get gpsfake/gpsd to work together
Date: Fri, 13 May 2022 11:09:14 -0700

Yo Steven!

On Fri, 13 May 2022 11:22:45 +0000
Steven Wawryk <> wrote:

> I'm developing an application that reads GPS data from gpsd servers.
> My development machine has no GPS, so I want to use gpsfake for
> testing.  I thought it was supposed to work out of the box, but I
> just can't get it to work.  I also can't find any similar issue in
> the FAQ, the troubleshooting section, or with google/duckduckgo -
> nothing I've found has been helpful.

Almost all the regressions use gpsfake, and there are a lot of them
I run the regressions before every push, so gpsfake is very well tested.

> The versions of gpsd, gpsfake and gpslib are 3.20, as it comes
> standard with the ubuntu 20.04 repos, but I would have thought that
> should still all work together.

gpsfake goes way back, so version does not matter much.  3,20 is from
2019, so a lot of bug fixes and improvements are not there for you.

> An example command line with resulting output is:
> $ gpsfake -v -l -P 2948 -c 1 output.nmea
> Processing output.nmea
> gpsd:ERROR: can't bind to local socket /tmp/gpsfake-3691836.sock
> gpsd:ERROR: control socket create failed, netlib error -1
> Traceback (most recent call last):
>   File "/usr/bin/gpsfake", line 319, in <module>
>   File "/usr/lib/python3/dist-packages/gps/", line 737, in run
>     raise TestSessionError("daemon died")
> gps.fake.TestSessionError

"can't bind to local socket" is a permission error.  Maybe you have
AppArmour, or SELinux, or some "seceurity" thing going.  Be sure those
are OFF.  Also try as root.

Maybe also check that your /tmp is drwxrwxrwt

> I've tried all kinds of other command options including -o to pass on
> various options to gpsd.  To rule out interference from the gpsd
> daemon I've tried it with and without:

Don't bother, you have a basic persm problem.

> $ sudo service gpsd stop
> Warning: Stopping gpsd.service, but it can still be activated by:
>   gpsd.socket
> $ systemctl stop gpsd.socket gpsd.service

Since you are using port 2948, it should not conflict with your 
systemd(umb) controled gpsd.  Just be sure you don't already have
another process runnong on 2948.  Try this, as root:

# netstat -apn | fgrep 2948

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpJIeoTZZYos.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]