summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-09-03 07:40:17 -0500
committerJohn Klug <john.klug@multitech.com>2021-09-07 10:51:04 -0500
commitbe6ef63e4509f08bc482f07a167ca1f1f21c7bcf (patch)
treefa81d85562f86c3345bd0a6bdddc49bb8eea07d2 /recipes-bsp/multitech/mts-io
parentc8738433c5c70d82ea212cf0beb2aefdb61c6c7e (diff)
downloadmeta-multitech-be6ef63e4509f08bc482f07a167ca1f1f21c7bcf.tar.gz
meta-multitech-be6ef63e4509f08bc482f07a167ca1f1f21c7bcf.tar.bz2
meta-multitech-be6ef63e4509f08bc482f07a167ca1f1f21c7bcf.zip
Add radio-reset notification, new MTRV1-0.4 hardware
Diffstat (limited to 'recipes-bsp/multitech/mts-io')
-rwxr-xr-xrecipes-bsp/multitech/mts-io/mts-io.init39
1 files changed, 29 insertions, 10 deletions
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
index 5c524de..3aa76af 100755
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -245,7 +245,8 @@ mfser_init() {
}
-set_gpslink() {
+
+set_links() {
[[ -d /var/run/config ]] || mkdir /var/run/config
gpscap=$(cat ${sysdir}/capability/gps)
@@ -255,15 +256,31 @@ set_gpslink() {
return
fi
- # Oldest MTRV1 uses venuse on ttyS1.
- if [[ ${hw_name} == MTRV1 ]] && [[ ${hw} != MTRV1-0.0 ]] ; then
- ln -sf /dev/ttyXRUSB0 /dev/gps0
- echo "u-blox" >"$GPSCONFIGTYPE"
- return
- fi
+ # Oldest MTRV1 uses venus on ttyS1.
+ # Newest MTRV1 usus U-Blox on ttyS1.
+ if [[ ${hw_name} == MTRV1 ]] ; then
+ case "${hw}" in
+ MTRV1-0.0)
+ ln -sf /dev/ttyS1 /dev/gps0
+ echo "venus" >"$GPSCONFIGTYPE"
+ return
+ ;;
+ MTRV1-0.1|MTRV1-0.2|MTRV1-0.3)
+ ln -sf /dev/ttyXRUSB0 /dev/gps0
+ echo "u-blox" >"$GPSCONFIGTYPE"
+ return
+ ;;
+ *)
+ ln -sf /dev/ttyS1 /dev/gps0
+ ln -sf /dev/ttyS4 /dev/ext_serial
+ echo "u-blox" >"$GPSCONFIGTYPE"
+ return
+ ;;
+ esac
+ fi # MTRV1 hardware version name
case ${hw_name} in
- MTR|MTRV1|MTHS)
+ MTR|MTHS)
ln -sf /dev/ttyS1 /dev/gps0
echo "venus" >"$GPSCONFIGTYPE"
return
@@ -281,7 +298,7 @@ set_gpslink() {
echo "u-blox" >"$GPSCONFIGTYPE"
return
;;
- esac
+ esac # not MTRV1 hardware version names
if [[ ${hw} == MTCDT ]] && [[ ${HWLVL} == 0.0 ]] ; then
# No GPS
@@ -332,7 +349,7 @@ case $1 in
modprobe ${f//.ko} 2>&1 | grep -v 'No such device or address'
done
fi
- set_gpslink # Set GPS symlink.
+ set_links # Set GPS symlink and maybe external serial.
/usr/bin/logger -t "mts-io" -p daemon.info -s "Resetting system modules"
read_card_info
/bin/busybox usleep $USLPTIME
@@ -343,6 +360,8 @@ case $1 in
waitpins
# Fix Telit error -62 and Redpine wrong USB speed detection on reset.
sleep 1
+ # Turn on radio-udev-discovery
+ mts-io-sysfs store radio-udev-discovery 5
if ! reset_path $USBRST ; then
((fail++))
fi