diff options
author | John Klug <john.klug@multitech.com> | 2017-08-28 12:38:34 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-09-14 17:30:47 -0500 |
commit | e774599a1d92ae0ac1a0ff065452f6db5c3cb149 (patch) | |
tree | 9a294a28c09dd1754e9a8c9b4495e95310ba38b6 | |
parent | 96fb7a16fbaab338dc8abebd511d0a5d12756a6f (diff) | |
download | meta-mlinux-e774599a1d92ae0ac1a0ff065452f6db5c3cb149.tar.gz meta-mlinux-e774599a1d92ae0ac1a0ff065452f6db5c3cb149.tar.bz2 meta-mlinux-e774599a1d92ae0ac1a0ff065452f6db5c3cb149.zip |
Always clear the APN first for firmware 0, and set the APN last for firmware 0
-rwxr-xr-x | recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh | 18 |
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 |