[Top][All Lists]

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

Re: GPSD over network not working correctly

From: Gary E. Miller
Subject: Re: GPSD over network not working correctly
Date: Fri, 18 Nov 2022 11:30:17 -0800

Yo Gustav!

On Fri, 18 Nov 2022 20:41:10 +0200
Gustav Vierbergen <> wrote:

> I downloaded the latest version of GPSD and built it from source
> (after removing the already installed versions) on both of my
> systems. I used apt purge to remove it.

Would that be gpsd 3.24?  Or gpsd from git head?  One is the latest
release, the other is the latest code.

> I then made a .c file containing the example code referenced here:
>, I changed the
> "localhost" parameter to (which is the IP of the device
> that has a gps connected) and compiled it using the provided gcc
> command: gcc example1.c -o example1 -lgps -lm

Good.  Did you look at the code to see what mistakes you made in your

> Before I ran the new example I first ran cgps like below.
> On device with gps i just run "cgps"
> On device without gps but connected to network with device which has
> gps i run "cgps"

Well, you skipped the part about how you started gpsd on the server.
What options?

> both cgps commands provide me with all the required information as
> seen in screenshots below
> Left hand side = "cgps"
> right hand side = "cgps"

Please cut/paste, not screen shots.  I have a hard time reading screen
shots, and I can't cut/paste bits to comment on.

Those look mostly OK.  No skyview.  Your system clock is off.

How long did you let gpsd and cpgs run before taking those shots?

> I then run the example1 application on both devices, please see below
> the output of the example1 application.

Neither looks good.

> I tried to copy the example1 executable from the working device to the
> non-working device and it was unable to run. it gave an error stating
> it was unable to find

remember I warned you not to mix gpsd versions?  Well, you just did that,

> I think this is because I have two different versions of libgps-dev
> (3.17-5 and 3.20-8) installed due to having two different Ubuntu
> distros (18.04 and 20.04), is it possible that this is the cause?

Yes, don't do that.  Be sure there is no version of gpsd installed
when you build gpsd from source, then build the example.

> Is there a way to get around this without upgrading/downgrading my
> ubuntu distro.?

Easy, just uninstall the Ubuntu gpsd version, and install gpsd from

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: pgpK2PnDoOlxt.pgp
Description: OpenPGP digital signature

reply via email to

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