I used udev rules in order to connect my GPS when I had it on a separate USB connection (had to disconnect from the flight controller for this to work though) and in the rules, I named it ttyGPS.
The gpsdebuginfo above is with the gpsd socket/gpsd disabled and with the GPS plugged into only the flight controller.
This is the gpsdebuginfo with the gpsd socket/gpsd enabled (is this what you mean be get gpsd running?) and the GPS plugged into only the USB.
root@clover-1060:/var/tmp# cat new.log
+ id -u
+ [ 0 != 0 ]
+ id
uid=0(root) gid=0(root) groups=0(root)
+ uname -a
Linux clover-1060 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 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/sbin/gpsd
+ gpsd -V
gpsd: 3.17 (revision 3.17)
+ gpsd -h
+ grep ^#.*enabled
# Socket export enabled.
# Shared memory export enabled.
# DBUS export enabled
# Time service features enabled.
# PPS 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 70u IPv6 16942 0t0 TCP localhost:gpsd (LISTEN)
systemd 1 root 75u IPv4 16944 0t0 TCP localhost:gpsd (LISTEN)
gpsd 735 gpsd 4u IPv6 16942 0t0 TCP localhost:gpsd (LISTEN)
gpsd 735 gpsd 5u IPv4 16944 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 735 gpsd 0u CHR 1,3 0t0 5 /dev/null
gpsd 735 gpsd 1u CHR 1,3 0t0 5 /dev/null
gpsd 735 gpsd 2u CHR 1,3 0t0 5 /dev/null
gpsd 735 gpsd 4u IPv6 16942 0t0 TCP localhost:gpsd (LISTEN)
gpsd 735 gpsd 5u IPv4 16944 0t0 TCP localhost:gpsd (LISTEN)
gpsdebugi 1005 root 0u CHR 136,0 0t0 3 /dev/pts/0
+ ps ax
+ sed -nE 1p;/gpsd/p
PID TTY STAT TIME COMMAND
735 ? S<s 0:00 /usr/sbin/gpsd /dev/ttyGPS
1005 pts/0 S+ 0:00 /bin/sh ./gpsdebuginfo
1018 pts/0 S+ 0:00 sed -nE 1p;/gpsd/p
+ command -v gpspipe
/usr/bin/gpspipe
+ gpspipe -V
gpspipe: 3.17 (revision 3.17)
+ gpspipe -w -n 2 -x 20
gpspipe: invalid option -- 'x'
Usage: gpspipe [OPTIONS] [server[:port[:device]]]
-d Run as a daemon.
-o [file] Write output to file.
-h Show this help.
-r Dump raw NMEA.
-R Dump super-raw mode (GPS binary).
-w Dump gpsd native data.
-S Set scaled flag.
-2 Set the split24 flag.
-l Sleep for ten seconds before connecting to gpsd.
-t Time stamp the data.
-T [format] set the timestamp format (strftime(3)-like; implies '-t')
-u usec time stamp, implies -t. Use -uu to output sec.usec
-s [serial dev] emulate a 4800bps NMEA GPS on serial port (use with '-r').
-n [count] exit after count packets.
-v Print a little spinner.
-p Include profiling info in the JSON.
-P Include PPS JSON in NMEA or raw mode.
-V Print version and exit.
You must specify one, or more, of -r, -R, or -w
You must use -o if you use -d.
+ 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/bin/ntpshmmon
+ ntpshmmon -V
ntpshmmon: version 3.17 (revision 3.17)
+ ntpshmmon -n 6 -t 10
ntpshmmon version 1
# Name Seen@ Clock Real L Prec
+ 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 Jul 22 03:17 /dev/ttyACM0
crw-rw---- 1 root dialout 166, 1 Jul 22 04:38 /dev/ttyACM1
crw-rw---- 1 root dialout 204, 64 Jul 22 03: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 003: ID 26ac:0012
Bus 001 Device 004: 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/bin/gpscat
+ command -v gpscat
+ head -n 1 /usr/bin/gpscat
#! /usr/bin/python
+ command -v python
/usr/bin/python
+ python -V
Python 2.7.16
+ python -c import gps;print(gps.__version__)
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'
+ 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/default/gpsd /etc/init.d/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyGPS"
# Other options you want to pass to gpsd
GPSD_OPTIONS=""
#!/bin/sh
### BEGIN INIT INFO
# Provides: gpsd
# Required-Start: $remote_fs $syslog $network
# Should-Start: bluetooth dbus udev
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Start-Before: ntp
# Short-Description: GPS (Global Positioning System) daemon
# Description: The gpsd service daemon is able to monitor one or
# more GPS devices connected to a host computer, making
# all data on the location and movements of the sensors
# available to be queried on TCP port 2947.
### END INIT INFO
# Author: Bernd Zeimetz <
bzed@debian.org>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
RUNDIR=/run/gpsd
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="GPS (Global Positioning System) daemon"
NAME=gpsd
DAEMON=/usr/sbin/$NAME
PIDFILE=$RUNDIR/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then
GPSD_SOCKET=/var/run/gpsd.sock
fi
if [ -n "$GPSD_SOCKET" ]; then
GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET"
fi
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
mkdir -p $RUNDIR || return 2
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$GPSD_OPTIONS -P $PIDFILE $DEVICES \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
if [ "$START_DAEMON" = "true" ]; then
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
else
[ "$VERBOSE" != no ] && \
log_daemon_msg "Not starting $DESC" "$NAME" && \
log_end_msg 0
fi
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
reload|force-reload)
log_daemon_msg "Reloading $DESC" "$NAME"
do_reload
log_end_msg $?
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:
+ 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
ExecStart=/usr/sbin/gpsd $GPSD_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=/var/run/gpsd.sock
ListenStream=[::1]:2947
ListenStream=
127.0.0.1:2947SocketMode=0600
[Install]
WantedBy=sockets.target
+ systemctl status gpsd.service
● gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-22 04:38:26 BST; 10min ago
Main PID: 735 (gpsd)
Tasks: 1 (limit: 3737)
CGroup: /system.slice/gpsd.service
└─735 /usr/sbin/gpsd /dev/ttyGPS
Jul 22 04:38:26 clover-1060 systemd[1]: Starting GPS (Global Positioning System) Daemon...
Jul 22 04:38:26 clover-1060 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; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-22 04:38:26 BST; 10min ago
Listen: /var/run/gpsd.sock (Stream)
[::1]:2947 (Stream)
127.0.0.1:2947 (Stream)
Tasks: 0 (limit: 3737)
CGroup: /system.slice/gpsd.socket
Jul 22 04:38:26 clover-1060 systemd[1]: Listening on GPS (Global Positioning System) Daemon Sockets.
+ journalctl -u gpsd.service --since today
-- Logs begin at Thu 2019-02-14 10:11:59 GMT, end at Thu 2021-07-22 04:45:25 BST. --
Jul 22 04:38:26 clover-1060 systemd[1]: Starting GPS (Global Positioning System) Daemon...
Jul 22 04:38:26 clover-1060 systemd[1]: Started GPS (Global Positioning System) Daemon.
+ command -v aa-status
+ command -v apparmor_status
+ set +x
Please send the entire, untouched output.