gpsd-users
[Top][All Lists]
Advanced

[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 <gustav4bergen@gmail.com> 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:
> https://gpsd.io/gpsd-client-example-code.html, I changed the
> "localhost" parameter to 172.17.1.1 (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
code?

> 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 172.17.1.1"

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 172.17.1.1"
> 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 libgps.so.26

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

> 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
source.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  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]