[Top][All Lists]

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

Re: [gpsd-users] GPSD on Debian 10 (buster): allowing other hosts to acc

From: Lisandro Damián Nicanor Pérez Meyer
Subject: Re: [gpsd-users] GPSD on Debian 10 (buster): allowing other hosts to access gpsd
Date: Tue, 24 Sep 2019 10:37:53 -0300
User-agent: NeoMutt/20180716

On 19/09/22 01:50, Charles Curley wrote:
> On Wed, 18 Sep 2019 10:19:35 -0600
> Charles Curley <address@hidden> wrote:
> > I have the Debian packaged gpsd (version 3.17-7 [Yes, I know:
> > ancient]) on Debian 10 (buster). It runs just fine and dandy, except
> > I cannot access it from another computer.
> A few notes to coalesce my results from this thread and some other
> research.
> * I'm not sure exactly how I did it, but I now have other hosts
>   listening to my gpsd.
> * /etc/systemd/system/gpsd.socket is as follows, with only the one
>   change:
>   --------------------------------------------------
>   [Unit]
>   Description=GPS (Global Positioning System) Daemon Sockets
>   [Socket]
>   ListenStream=/var/run/gpsd.sock
>   ListenStream=[::1]:2947
>   # ListenStream=
>   ListenStream=

Right, you are telling systemd to listen for incoming connections in all your
interfaces except only on localhost, thus any incoming connection would start
gpsd if it hasn't started yet...

> * gpsd.service is unchanged.
> * Add two options in /etc/default/gpsd, like so:
>   --------------------------------------------------
>   # Other options you want to pass to gpsd
>   --------------------------------------------------

... and option -n will make gpsd poll the GPS even if there are no clients
connected. This might or not fit you well if you need to preserve battery power.
If you do you can try not passing -n.

I must admit I missed the localhost part in the original ListenStream.

> * I don't know if you have to run "systemctl daemon-reload" after each
>   edit, but it doesn't seem to hurt.
> * After each edit, do run "systemctl restart gpsd.socket". Apparently
>   running "systemctl restart gpsd" doesn't do it. Thank you Lisandro
>   Damián Nicanor Pérez Meyer <address@hidden> for that.

systemctl restart gpsd is the same as doing systemctl restart gpsd.service.

The difference between .socket and .service is nicely briefed here:

Hope that helps, Lisandro.

reply via email to

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