summaryrefslogtreecommitdiff
path: root/recipes-navigation
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-03-02 09:38:27 -0600
committerJohn Klug <john.klug@multitech.com>2021-03-02 03:59:34 -0600
commit64631b5fe2558bdb1efcf01ed287527dbb2bbaee (patch)
treeaab8eee1427f1db91c0a3cdf31c65ad6c4820e32 /recipes-navigation
parent118a90b9da704c40a5b0ffe2413e639a89f90ba4 (diff)
downloadmeta-mlinux-64631b5fe2558bdb1efcf01ed287527dbb2bbaee.tar.gz
meta-mlinux-64631b5fe2558bdb1efcf01ed287527dbb2bbaee.tar.bz2
meta-mlinux-64631b5fe2558bdb1efcf01ed287527dbb2bbaee.zip
Reset U-Blox serial port when resetting the U-Blox
Diffstat (limited to 'recipes-navigation')
-rwxr-xr-xrecipes-navigation/gpsd/gpsd/gpsd-default11
-rw-r--r--recipes-navigation/gpsd/gpsd_3.20.bb2
2 files changed, 11 insertions, 2 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default
index 1e52546..4389c6c 100755
--- a/recipes-navigation/gpsd/gpsd/gpsd-default
+++ b/recipes-navigation/gpsd/gpsd/gpsd-default
@@ -67,9 +67,12 @@ if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
((maxtries--))
if ((maxtries == 5)) ; then
# Not going well, so reset the GPS.
+ logger -s -t 'gpsd info' -p daemon.alert "u-blox is unresponsive, so reset it"
mts-io-sysfs store gnss-reset 0
usleep 50
mts-io-sysfs store gnss-reset 1
+ # Reset terminal to defaults
+ stty -F "$GPS_LINE" '500:5:cbd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0'
sleep 5
fi # Reset at maxtries == 5
@@ -110,7 +113,13 @@ if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
logger -s -t 'gpsd info' -p daemon.alert "gpsctl -T 2 -f $GPS_LINE"
logger -s -t 'gpsd info' -p daemon.alert "$GPS_LINE: $(stty -F $GPS_LINE speed) baud"
logger -s -t 'gpsd info' -p daemon.alert "$result"
- fi # If out of loop with maxtries exhausted, print error
+ elif [[ $(mts-io-sysfs show hw-version) =~ ^MTHS- ]] ; then
+ if gpsctl -t 'u-blox' -D 5 -x '\x06\x41\x00\x00\x03\x1F\x90\x47\x4F\xB1\xFF\xFF\xEA\xFF' $GPS_LINE ; then
+ logger -s -t 'gpsd info' -p daemon.info "GPS LNA set high"
+ else
+ logger -s -t 'gpsd info' -p daemon.alert "ERROR: GPS LNA not set"
+ fi
+ fi #
fi # If U-Blox GPS type
}
diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb
index 2176924..ba1b33e 100644
--- a/recipes-navigation/gpsd/gpsd_3.20.bb
+++ b/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -4,7 +4,7 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53"
DEPENDS = "dbus dbus-glib ncurses python3 libusb1 chrpath-replacement-native pps-tools"
PROVIDES = "virtual/gpsd"
-PR="m5"
+PR="m6"
#TODO
#the recipe generates python2 pygps package for Atmel based devices and python3 pygps package for TI based devices.