A bit reluctant in answering because there a quite a couple of issue you will run into.
It is possible, I have a running gpsd daemon on my SatNOGS client.
I am using a cheap USB u-blox gps receiver and by default the only thing you have to do is add the gps device file in /etc/default/gpsd
, in my case it is /dev/ttyUSB0
check the access right for the device
ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jan 18 14:30 /dev/ttyUSB0
The user interacting with /dev/ttyUSB0
need to be member of the dialout group.
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyUSB0"
# Other options you want to pass to gpsd
GPSD_OPTIONS=""
# Automatically hot add/remove USB GPS devices via gpsdctl
USBAUTO="true"
This should be enough to get it up and running sudo systemctl enable gpsd
and sudo systemctl start gpsd' but in my case I ran into a problem, by default gpsd want to use ipv6 address
::1 and that was available on my system and I have to modify
/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=no
[Install]
WantedBy=sockets.target
Now run sudo systemctl daemon-reload
and try to start sudo systemctl restart gpsd.socket
and sudo systemctl restart gpsd
with sudo systemctl status gpsd
you can see if it is up and running.
Now with gpsmon -n
I can see if gpsd is working.
dev/ttyACM0 NMEA0183>
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βTime: 2023-01-18T13:16:43.000Z Lat: xx 43.264000' N Lon: x 01.809200' E β
ββββββββββββββββββββββββββββββββββ Cooked TPV ββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GPZDA GPGGA GPRMC GPGSA GPGSV GPGBS GPALM β
ββββββββββββββββββββββββββββββββββ Sentences βββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SVID PRN Az El SN HUβTime: 131643.00 βTime: 131643.00 β
βGP 10 10 264 8 16 YβLatitude: xx43.2640 N βLatitude: xx43.2640 β
βGP 12 12 241 76 11 YβLongitude: xxx01.8092 E βLongitude: xxx01.8092 β
βGP 17 17 35 11 14 YβSpeed: 0.0194 βAltitude: -16.58 β
βGP 19 19 55 36 9 YβCourse: 65.765 βQuality: 1 Sats: 13 β
βGP 24 24 130 63 22 YβStatus: A FAA: βHDOP: 0.96 β
βGP 25 25 248 45 13 YβMagVar: 1.5 E βGeoid: 44.83 β
βGP 32 32 302 37 11 Yββββββββββ RMC βββββββββββββββββββββββ GGA βββββββββββββ
βGA 2 302 253 55 11 Yββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βGP 6 6 85 14 0 NβMode: A3 Sats: 10 12 17 +βUTC: RMS: β
βGP 11 11 119 2 0 NβDOP H=1.0 V=1.2 P=1.5 βMAJ: MIN: β
βGP 15 15 175 5 21 NβTOFF: 0.039455254 βORI: LAT: β
βGP 22 22 322 12 0 NβPPS: N/A βLON: ALT: β
ββββvββββ GSV βββββββββββββββββ GSA + PPS ββββββββββββββββββββ GST βββββββββββββ
(32) $GPGSV,9,9,33,428,18,157,00*7D
(91) $GPALM,1,1,09,0197,00,1515,63,08a7,fffffd5c,a10d12,4ff77d,1119f6,ffdfede0,f
fffff0b,002*4B
(38) $GPZDA,131643.00,18,01,2023,00,00*6F
(76) $GPGGA,131643.00,5143.2640,N,00501.8092,E,1,13,0.96,-16.58,M,44.836,M,,*7D
(75) $GPRMC,131643.00,A,5143.2640,N,00501.8092,E,0.0194,65.765,180123,1.5,E*58
(56) $GPGSA,A,3,10,12,17,19,24,25,32,302,,,,,1.5,1.0,1.2*09
(44) $GPGBS,131643.00,7.363,12.371,5.913,,,,*7A
(70) $GPGSV,9,1,33,06,14,085,00,10,08,264,16,11,02,119,00,12,76,241,11*7F
So with some obstacles gpsd is running and active, now how to tell the SatNOGS client to use the location data provided with gpsd?
My best guess is to set the following variables:
SATNOGS_GPSD_CLIENT_ENABLED=True
SATNOGS_GPSD_HOST=127.0.0.1
SATNOGS_GPSD_PORT=2947
SATNOGS_GPSD_TIMEOUT=0
I do wonder if the satnogs-client location will also be managed by these settings maybe @kerel can answer this.
Some commands to see if thing are working:
SatNOGS logging sudo journalctl -f -u satnogs-client -n 512
GPS logging sudo journalctl -f -u gpsd -n 512
GPS socket logging sudo journalctl -f -u gpsd.socket -n 512
I hope this is useful and will get people starting.