From e774599a1d92ae0ac1a0ff065452f6db5c3cb149 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 28 Aug 2017 12:38:34 -0500 Subject: Always clear the APN first for firmware 0, and set the APN last for firmware 0 --- .../cell-radio-fwswitch/cell-radio-fwswitch.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'recipes-core/multitech') 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 -- cgit v1.2.3