gpsd-users
[Top][All Lists]
Advanced

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

Re: GPSD 3.23~rc1 connection to GPS


From: Gary E. Miller
Subject: Re: GPSD 3.23~rc1 connection to GPS
Date: Thu, 5 Aug 2021 11:24:57 -0700

Yo Aranza!

This is a systemd(umb) problem, and I can't help with those.  If you
want to turn off systemd(umber) control of gpsd, then I can help.

I suggest your check out the Troubleshooting document on systemd(umbest):

https://gpsd.io/troubleshooting.html#systemdtroubleshooting

On Thu, 5 Aug 2021 13:08:52 -0700
Aranza Shaccid Leon <leon18@pnw.edu> wrote:

> Hello and good afternoon!
> 
> If I may ask, I'm having a connection issue with my gps. I currently
> have it set up as /dev/gps0, but when I attempt either to set the
> DEVICES:"/dev/gps0" in the  /gpsd/gpsd3.23~rc1/packaging/dev
> directory (and open file etc_default_gpsd.in) or attempt gpsd -n
> /dev/gps0 in root or normal user, the gpsd does not connect to the
> port. Here is my systemctl status gpsd:
> + systemctl status gpsd.socket
> ● gpsd.socket - GPS (Global Positioning System) Daemon Sockets
>    Loaded: loaded (/lib/systemd/system/gpsd.socket; disabled; vendor
> preset: enabled)
>    Active: active (running) since Thu 2021-08-05 06:44:57 BST; 12min
> ago Listen: /run/gpsd.sock (Stream)
>            [::1]:2947 (Stream)
>            127.0.0.1:2947 (Stream)
>     Tasks: 0 (limit: 3596)
>    CGroup: /system.slice/gpsd.socket
> 
> And here is my gpsdebuginfo:
> + id -u
> + [ 0 != 0 ]
> + id
> uid=0(root) gid=0(root) groups=0(root)
> + uname -a
> Linux clover-9676 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021
> armv7l GNU/Linux
> + cat /etc/os-release
> PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
> NAME="Raspbian GNU/Linux"
> VERSION_ID="10"
> VERSION="10 (buster)"
> VERSION_CODENAME=buster
> ID=raspbian
> ID_LIKE=debian
> HOME_URL="http://www.raspbian.org/";
> SUPPORT_URL="http://www.raspbian.org/RaspbianForums";
> BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs";
> + command -v gpsd
> /usr/local/sbin/gpsd
> + gpsd -V
> gpsd: 3.23~rc1 (revision 3.23~rc1)
> + gpsd -h
> + grep ^#.*enabled
> # Control socket for hotplug notifications enabled.
> # KPPS enabled.
> # Magic Hat enabled.
> # Netfeed enabled.
> # NTRIP enabled.
> # Shared memory export enabled.
> # Socket export enabled.
> # systemd socket activation enabled.
> + command -v sockstat
> + command -v lsof
> /usr/bin/lsof
> + lsof -iTCP:2947 -s TCP:LISTEN
> COMMAND PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
> systemd   1   root   58u  IPv6  11017      0t0  TCP localhost:gpsd
> (LISTEN) systemd   1   root   59u  IPv4  12183      0t0  TCP
> localhost:gpsd (LISTEN) gpsd    878 nobody    4u  IPv6  11017
> 0t0  TCP localhost:gpsd (LISTEN) gpsd    878 nobody    5u  IPv4
> 12183      0t0  TCP localhost:gpsd (LISTEN)
> + lsof -c gpsd
> + sed -nE 1p;/CHR|LISTEN/p
> COMMAND   PID   USER   FD   TYPE     DEVICE SIZE/OFF   NODE NAME
> gpsd      878 nobody    0u   CHR        1,3      0t0      5 /dev/null
> gpsd      878 nobody    1u   CHR        1,3      0t0      5 /dev/null
> gpsd      878 nobody    2u   CHR        1,3      0t0      5 /dev/null
> gpsd      878 nobody    4u  IPv6      11017      0t0    TCP
> localhost:gpsd (LISTEN)
> gpsd      878 nobody    5u  IPv4      12183      0t0    TCP
> localhost:gpsd (LISTEN)
> gpsdebugi 982   root    0u   CHR      136,0      0t0      3 /dev/pts/0
> gpsdebugi 982   root    1u   CHR      136,0      0t0      3 /dev/pts/0
> gpsdebugi 982   root    2u   CHR      136,0      0t0      3 /dev/pts/0
> + ps ax
> + sed -nE 1p;/gpsd/p
>   PID TTY      STAT   TIME COMMAND
>   878 ?        S<s    0:00 /usr/local/sbin/gpsd
>   982 pts/0    S+     0:00 /bin/sh /usr/local/bin/gpsdebuginfo
>   995 pts/0    S+     0:00 sed -nE 1p;/gpsd/p
> + command -v gpspipe
> /usr/local/bin/gpspipe
> + gpspipe -V
> gpspipe: 3.23~rc1 (revision 3.23~rc1)
> + gpspipe -w -n 2 -x 20
> {"class":"VERSION","release":"3.23~rc1","rev":"3.23~rc1","proto_major":3,"proto_minor":14}
> {"class":"DEVICES","devices":[]}
> + command -v ipcs
> /usr/bin/ipcs
> + ipcs -m
> + sed -nE /key/p;/KEY/p;/0x4e5450/p
> key        shmid      owner      perms      bytes      nattch
> status 0x4e545030 0          root       600        80         1
> 0x4e545031 1          root       600        80         1
> 0x4e545032 2          root       666        80         1
> 0x4e545033 3          root       666        80         1
> 0x4e545034 4          root       666        80         1
> 0x4e545035 5          root       666        80         1
> 0x4e545036 6          root       666        80         1
> 0x4e545037 7          root       666        80         1
> + command -v ntpshmmon
> /usr/local/bin/ntpshmmon
> + ntpshmmon -V
> ntpshmmon: version 3.23~rc1 (revision 3.23~rc1)
> + ntpshmmon -n 6 -t 10
> ntpshmmon: version 3.23~rc1
> #      Name  Seen@                 Clock                 Real
>   L Prc
> + ls -l /dev/pps* /dev/ttyACM0 /dev/ttyACM1 /dev/ttyAMA0
> ls: cannot access '/dev/pps*': No such file or directory
> crw-rw---- 1 root dialout 166,  0 Aug  5 06:17  /dev/ttyACM0
> crw-rw---- 1 root dialout 166,  1 Aug  5 06:57  /dev/ttyACM1
> crw-rw---- 1 root dialout 204, 64 Aug  5 06:17  /dev/ttyAMA0
> + command -v lsusb
> /usr/bin/lsusb
> + lsusb
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 004: ID 26ac:0012
> Bus 001 Device 003: ID 1546:01a8 U-Blox AG [u-blox 8]
> Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> + echo PYTHONPATH
> PYTHONPATH
> + command -v gpscat
> /usr/local/bin/gpscat
> + command -v gpscat
> + head -n 1 /usr/local/bin/gpscat
> #!/usr/bin/env python
> + command -v python
> /usr/bin/python
> + python -V
> Python 2.7.16
> + python -c import gps;print(gps.__version__)
> 3.23~rc1
> + command -v python3
> /usr/bin/python3
> + python3 -V
> Python 3.7.3
> + python3 -c import gps;print(gps.__version__)
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> ModuleNotFoundError: No module named 'gps'
> + command -v systemctl
> /usr/bin/systemctl
> + cat /etc/*/gpsd
> cat: '/etc/*/gpsd': No such file or directory
> + systemctl cat gpsd.service
> # /lib/systemd/system/gpsd.service
> [Unit]
> Description=GPS (Global Positioning System) Daemon
> Requires=gpsd.socket
> # Needed with chrony SOCK refclock
> After=chronyd.service
> 
> [Service]
> Type=forking
> EnvironmentFile=-/etc/default/gpsd
> EnvironmentFile=-/etc/sysconfig/gpsd
> ExecStart=/usr/local/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES
> 
> [Install]
> WantedBy=multi-user.target
> Also=gpsd.socket
> + systemctl cat gpsd.socket
> # /lib/systemd/system/gpsd.socket
> [Unit]
> Description=GPS (Global Positioning System) Daemon Sockets
> 
> [Socket]
> ListenStream=/run/gpsd.sock
> ListenStream=[::1]:2947
> ListenStream=127.0.0.1:2947
> # To allow gpsd remote access, start gpsd with the -G option and
> # uncomment the next two lines:
> # ListenStream=[::]:2947
> # ListenStream=0.0.0.0:2947
> SocketMode=0600
> BindIPv6Only=yes
> 
> [Install]
> WantedBy=sockets.target
> + systemctl status gpsd.service
> ● gpsd.service - GPS (Global Positioning System) Daemon
>    Loaded: loaded (/lib/systemd/system/gpsd.service; disabled; vendor
> preset: enabled)
>    Active: active (running) since Thu 2021-08-05 06:46:48 BST; 11min
> ago Process: 877 ExecStart=/usr/local/sbin/gpsd $GPSD_OPTIONS $OPTIONS
> $DEVICES (code=exited, status=0/SUCCESS)
>  Main PID: 878 (gpsd)
>     Tasks: 1 (limit: 3596)
>    CGroup: /system.slice/gpsd.service
>            └─878 /usr/local/sbin/gpsd
> 
> Aug 05 06:46:48 clover-9676 systemd[1]: Starting GPS (Global
> Positioning System) Daemon...
> Aug 05 06:46:48 clover-9676 systemd[1]: Started GPS (Global
> Positioning System) Daemon.
> + systemctl status gpsd.socket
> ● gpsd.socket - GPS (Global Positioning System) Daemon Sockets
>    Loaded: loaded (/lib/systemd/system/gpsd.socket; disabled; vendor
> preset: enabled)
>    Active: active (running) since Thu 2021-08-05 06:44:57 BST; 12min
> ago Listen: /run/gpsd.sock (Stream)
>            [::1]:2947 (Stream)
>            127.0.0.1:2947 (Stream)
>     Tasks: 0 (limit: 3596)
>    CGroup: /system.slice/gpsd.socket
> 
> Aug 05 06:44:57 clover-9676 systemd[1]: Listening on GPS (Global
> Positioning System) Daemon Sockets.
> + journalctl -u gpsd.service --since today
> -- Logs begin at Thu 2021-08-05 06:17:01 BST, end at Thu 2021-08-05
> 06:49:00 BST. --
> Aug 05 06:46:48 clover-9676 systemd[1]: Starting GPS (Global
> Positioning System) Daemon...
> Aug 05 06:46:48 clover-9676 systemd[1]: Started GPS (Global
> Positioning System) Daemon.
> + command -v aa-status
> + command -v apparmor_status
> + set +x
> Please send the entire, untouched output.
> 
> The commands I used to set up gpsd were:
> sudo su -
> apt-get update
> apt-get dist-update
> rpi-update
> reboot
> 
> sudo su -
> apt-get install scons libncurses5-dev python-dev pps-tools
> purge  gpsd gpsd-clients
> git clone https://gitlab.com/gpsd/gpsd.git
>  scons --config=force && scons install
> cd gpsd
>  scons && scons check && scons udev-install
> 
> I've also attempted:
> root@clover-9676:~# gpsd -D 5 -N -n /dev/gps0
> gpsd:WARN: This system has a 32-bit time_t.  This gpsd will fail at
> 2038-01-19T0
>                          3:14:07Z.
> gpsd:INFO: launching (Version 3.23~rc1)
> gpsd:IO: opening IPv4 socket
> gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
> gpsd:ERROR: maybe gpsd is already running!  Or systemd has the port?
> gpsd:IO: opening IPv6 socket
> gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
> gpsd:ERROR: maybe gpsd is already running!  Or systemd has the port?
> gpsd:ERROR: command sockets creation failed, netlib errors -1, -1
> 
> May I ask what would be the best method to connect to gpsd?
> 
> Thank you for time and consideration.
> 
> Sincerely,
> Leon




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


reply via email to

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