diff options
author | John Klug <john.klug@multitech.com> | 2017-08-28 17:05:39 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-08-28 17:05:39 -0500 |
commit | 441c89fa7bba47b95be06a49dd478d9c7a9343cd (patch) | |
tree | b498c273727cbcd06474708ca0f4811b27b2d147 /recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn | |
parent | 461ee4323d8ffbee486554d86d52c0911efe0714 (diff) | |
download | meta-mlinux-441c89fa7bba47b95be06a49dd478d9c7a9343cd.tar.gz meta-mlinux-441c89fa7bba47b95be06a49dd478d9c7a9343cd.tar.bz2 meta-mlinux-441c89fa7bba47b95be06a49dd478d9c7a9343cd.zip |
Since Telit LE910-NA1 can have a single firmware, key off of product-id
Diffstat (limited to 'recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn')
-rwxr-xr-x | recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn index a588587..8e4d3d2 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn @@ -46,13 +46,17 @@ lvw2_chat_file=/etc/ppp/peers/lvw2_chat leu1_chat_file=/etc/ppp/peers/leu1_chat lna3_chat_file=/etc/ppp/peers/lna3_chat +radioproduct=$(/usr/sbin/mts-io-sysfs show product-id) # LNA3? + model=$(radio-query --model 2>/dev/null) if (($? != 0)) ; then echo "Radio is not ready or not found and cannot determine the type" exit 1 fi -if [[ $model == "LE910-NA1" ]] ; then +# Only support LNA3 + +if [[ $model == LE910-NA1 ]] && [[ $radioproduct =~ -LNA3- ]] ; then if ((clear != 1)) ; then if sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=3,\"([^\"]*)\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=3,\"\2\",\"${apn}\"'/" $lna3_chat_file ; then echo "Set APN to \"${apn}\" in $lna3_chat_file" @@ -78,6 +82,9 @@ if [[ $model == "LE910-NA1" ]] ; then fi fi exit 0 +else + echo "Radio in product-id must be -LNA3- for LE910-NA1" + echo "Radio model is \"$model\", product-id is \"$radioproduct\"" fi |