summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-08-28 12:38:34 -0500
committerJohn Klug <john.klug@multitech.com>2017-08-28 12:48:05 -0500
commit9f49196a8942f645b8fb263f682fe05904977c59 (patch)
tree3cfa1dd97a6e8a43cb4251d31e7c8c9e1c9492db
parent981ca433361738013dbce79f6ab38d4c20b7cf11 (diff)
downloadmeta-mlinux-9f49196a8942f645b8fb263f682fe05904977c59.tar.gz
meta-mlinux-9f49196a8942f645b8fb263f682fe05904977c59.tar.bz2
meta-mlinux-9f49196a8942f645b8fb263f682fe05904977c59.zip
Always clear the APN first for firmware 0, and set the APN last for firmware 0
-rwxr-xr-xrecipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh b/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh
index fdf21f0..a101e56 100755
--- a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh
+++ b/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh
@@ -53,6 +53,12 @@ if [ "$FWACTIVE" == "$FWIMAGE" ]; then
exit 0
fi
+# Verizon does not want an APN, so remove first
+if ((FWIMAGE == 1)) ; then
+ /usr/sbin/mlinux-switch-apn $FWIMAGE
+fi
+
+
#
# Switch the firmware
#
@@ -68,7 +74,12 @@ fi
#
# This is somewhat dangerous in that we assume the radio
# will switch.
-[ $TIMEOUT -eq 0 ] && (/usr/sbin/set-apn "$FWIMAGE" || exit 0)
+if ((TIMEOUT == 0)) ; then
+ if ((FWIMAGE == 0)) ; then
+ echo "Use mlinux-switch-apn to switch the APN when the radio is ready, before dialing"
+ exit 0
+ fi
+fi
#
# Wait for the radio to be ready before continuing
@@ -86,7 +97,7 @@ while [ $COUNTER -lt $TIMEOUT ]; do
MODEL=$(radio-query --model)
if [ $? -eq 0 ]; then
echo "Cellular radio firmware has been switched to $FWIMAGE image."
- /usr/sbin/mlinux-switch-apn $FWIMAGE
+ ((FWIMAGE == 0)) && /usr/sbin/mlinux-switch-apn $FWIMAGE
exit 0
fi
@@ -97,6 +108,7 @@ while [ $COUNTER -lt $TIMEOUT ]; do
sleep 1
done
-/usr/sbin/mlinux-switch-apn $FWIMAGE
echo "Cellular radio is not ready."
+echo "When it becomes ready, invoke /usr/sbin/mlinux-switch-apn"
+echo "to set the APN"
exit 1