gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] GPSD -G Option Doesn't Always Work


From: Florian Petry
Subject: Re: [gpsd-users] GPSD -G Option Doesn't Always Work
Date: Wed, 17 May 2017 08:14:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hello.

We also found that the -G option does not work reliably. Using Ubuntu
even before systemd was introduced there and having the same problem, I
don't think it is systemd related.

We also did a workaround. We are using gps2udp to provide the data and
are connecting to this UDP port with a gpsd on the client machine. This
worked reliably.

In general (at least for us) the direct connection between to gpsd
instances via "gpsd://<IP>:<PORT>" (also with gpsfake) got stuck after a
random time with different errors/behaviours.

When I was investigating this some time ago, I also asked in the IRC
channel, and the -G in combination with "gpsd://..." seems to be a
relatively seldom used function.

@Gary:
> Since no ne else has picked up on this: running gpsd under systemd
> is always problematic.  I suggest you do not do so.
Can you detail on this? What are the problems using systemd with gpsd?
Is there something like a known issues list? We are using gpsd/systemd
on a lot of stations, and it seems to work fine?

Regards,
Florian

Am 17.05.2017 um 01:43 schrieb B.W. Guffey:
FWIW I'm using the -G option via systemd reliably on Arch (Arm) so long
as I do NOT enable the systemd socket.

 address@hidden cat /etc/gpsd
 # Default settings for gpsd.
 START_DAEMON="true"
 USBAUTO="true"
 OPTIONS="-G -n"
 PORT="2947"
 SOCKET="/var/run/gpsd.sock"
 DEVICES="/dev/ttyAMA0"

 $ cat /etc/systemd/system/multi-user.target.wants/gpsd.service
 [Unit]
 Description=GPS (Global Positioning System) Daemon
 #Requires=gpsd.socket
 After=chronyd.service

 [Service]
 EnvironmentFile=-/etc/gpsd
 ExecStart=/usr/sbin/gpsd -N $OPTIONS -P $PORT -F $SOCKET $DEVICES

 [Install]
 WantedBy=multi-user.target
 #Also=gpsd.socket

However I have to do things different on the client machines.
Evidently a local gpsd instance won't listen to remote gpsd instances
directly.  Instead, I have to use socat and gpspipe to create a virtual
serial GPS, then point the local gpsd instance to that port.  I'm doing
this through a NetworkManager dispatcher script on the client machines.

$ cat /etc/NetworkManager/dispatcher.d/20-RemoteGPS
 #!/bin/sh
 ESSID="MyWiFiNetwork"

 interface=$1 status=$2
 case $status in
   up)
    if iwgetid | grep -qs ":\"$ESSID\""; then
       sudo socat exec:"'gpspipe -w rpi3-1:2947'"
PTY,link=/dev/gpsRMT0,raw &

       sleep 5
       sudo chown root:uucp /dev/gpsRMT0
       sudo chmod 0777 /dev/gpsRMT0
       sudo systemctl restart gpsd.service
     fi
     ;;
   down)
     sudo killall gpspipe
     ;;
 esac

It's cludgy but it works reliably.



On Tue, 2017-05-16 at 15:27 -0700, Gary E. Miller wrote:
Yo Joshua!

On Tue, 16 May 2017 18:23:22 -0400
"Joshua Quesenberry" <address@hidden> wrote:

Systemd has worked really well so far. This issue crops up also
when
running gpsfake (unrelated to systemd) and this is the use case I'm
targeting currently. Seems that since two different methods of
starting gpsd are having the same outcome that there may be a bug
on
the gpsd side?

Can you put together a simple test for what you see, that does not
use
systemd?

RGDS
GARY
-------------------------------------------------------------------
--------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
     address@hidden  Tel:+1 541 382 8588

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


—

ingenieur
wissenschaften
htw saar

Hochschule für Technik und Wirtschaft des Saarlandes
University of Applied Sciences

Fakultät für Ingenieurwissenschaften
School of Engineering

Florian Petry, M.Sc.
Forschungsgruppe Verkehrstelematik (FGVT)

InnovationsCampus Saar
Altenkesseler Strasse 17/D2
66115 Saarbruecken
Germany

+49 681 5867-648
address@hidden
http://www.htwsaar.de
https://fgvt.htwsaar.de




reply via email to

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