Saved Pi setup for GSPd and QtGPS
This commit is contained in:
14
pi/etc/default/gpsd
Normal file
14
pi/etc/default/gpsd
Normal file
@ -0,0 +1,14 @@
|
||||
# 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/ttyACM0"
|
||||
|
||||
# Other options you want to pass to gpsd
|
||||
GPSD_OPTIONS="-G"
|
||||
15
pi/etc/systemd/system/multi-user.target.wants/gpsd.service
Normal file
15
pi/etc/systemd/system/multi-user.target.wants/gpsd.service
Normal file
@ -0,0 +1,15 @@
|
||||
[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
|
||||
|
||||
12
pi/etc/systemd/system/sockets.target.wants/gpsd.socket
Normal file
12
pi/etc/systemd/system/sockets.target.wants/gpsd.socket
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=GPS (Global Positioning System) Daemon Sockets
|
||||
|
||||
[Socket]
|
||||
ListenStream=
|
||||
ListenStream=/var/run/gpsd.sock
|
||||
ListenStream=[::1]:2947
|
||||
ListenStream=0.0.0.0:2947
|
||||
SocketMode=0600
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
25
pi/setup.sh
Executable file
25
pi/setup.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Python 3
|
||||
echo "Python 3 Software:"
|
||||
sudo apt-get -y --ignore-missing install python3-all python3-dev python3-tk idle3 python3-pip python3-pyqt5 python3-serial python3-can python3-protobuf python3-numpy python3-pil.imagetk python3-gi
|
||||
sudo apt-get -y --ignore-missing install spyder3 python3-pyside2.*
|
||||
sudo apt-get -y --ignore-missing install gpsd gpsd-clients gpsbabel libgps-dev
|
||||
|
||||
# Python addons
|
||||
echo "Python 3 Packages:"
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install --upgrade pyserial matplotlib numpy scipy gps gpxpy maidenhead virtualenv virtualenvwrapper
|
||||
|
||||
# enable and start gpsd service
|
||||
sudo systemctl enable gpsd.service
|
||||
|
||||
# gpsd startup
|
||||
sudo cp -r etc/* /etc/
|
||||
sudo cp -r lib/* /lib/
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
# enable and start gpsd service
|
||||
sudo systemctl start gpsd.service
|
||||
sudo systemctl enable x11vnc.service
|
||||
sudo systemctl start x11vnc.service
|
||||
Reference in New Issue
Block a user