From d66c6f7d7bf1598cae476d4f0a1917b82dae2db3 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 14 Mar 2019 17:59:49 +0100 Subject: [PATCH] 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. --- recipes-extra/gpsd/gpsd/oc2g/gpsd-default | 5 +++++ recipes-extra/gpsd/gpsd/oc2g/gpsd.service | 13 +++++++++++++ recipes-extra/gpsd/gpsd_3.10.bb | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 recipes-extra/gpsd/gpsd/oc2g/gpsd-default create mode 100644 recipes-extra/gpsd/gpsd/oc2g/gpsd.service diff --git a/recipes-extra/gpsd/gpsd/oc2g/gpsd-default b/recipes-extra/gpsd/gpsd/oc2g/gpsd-default new file mode 100644 index 0000000..cbdb00d --- /dev/null +++ b/recipes-extra/gpsd/gpsd/oc2g/gpsd-default @@ -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" diff --git a/recipes-extra/gpsd/gpsd/oc2g/gpsd.service b/recipes-extra/gpsd/gpsd/oc2g/gpsd.service new file mode 100644 index 0000000..d2183b8 --- /dev/null +++ b/recipes-extra/gpsd/gpsd/oc2g/gpsd.service @@ -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 diff --git a/recipes-extra/gpsd/gpsd_3.10.bb b/recipes-extra/gpsd/gpsd_3.10.bb index 1c43d1d..6a45979 100644 --- a/recipes-extra/gpsd/gpsd_3.10.bb +++ b/recipes-extra/gpsd/gpsd_3.10.bb @@ -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 \