oc2g: Fix gpsd to use the correct baudrate and port

The autobauding feature of gpsd would not work even once the correct port was
set. The systemd service file now sets the baudrate of 115200 before starting
gpsd.
This commit is contained in:
Daniel Willmann 2019-03-14 17:59:49 +01:00
parent 92196fd94f
commit d66c6f7d7b
3 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,5 @@
# If you must specify a non-NMEA driver, uncomment and modify the next line
GPSD_SOCKET="/var/run/gpsd.sock"
GPSD_OPTIONS="-n"
GPS_DEVICES="/dev/ttyS0"
GPS_BAUDRATE="115200"

View File

@ -0,0 +1,13 @@
[Unit]
Description=GPS Service Daemon
After=syslog.target network.target
[Service]
EnvironmentFile=-/etc/default/gpsd
ExecStartPre=/bin/stty -F $GPS_DEVICES speed $GPS_BAUDRATE
ExecStart=/usr/sbin/gpsd -N -F $GPSD_SOCKET $GPSD_OPTIONS $GPS_DEVICES
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target

View File

@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
DEPENDS = "ncurses python"
PROVIDES = "virtual/gpsd"
PR = "r3.19"
PR = "r3.20"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \