gpsd-users
[Top][All Lists]
Advanced

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

GPSD over network not working correctly


From: Gustav Vierbergen
Subject: GPSD over network not working correctly
Date: Fri, 18 Nov 2022 20:41:10 +0200

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.

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

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"

image.png

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

image.png

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

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?

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

Kind Regards

reply via email to

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