summaryrefslogtreecommitdiff
path: root/recipes-core/multitech/config/chat_wrapper
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-10-26 09:42:37 -0500
committerJohn Klug <john.klug@multitech.com>2021-12-29 07:10:32 -0600
commit8363839d482602cfca6dda49344abb6b05eeb47c (patch)
tree12a622bb95b84e503f08da1fb660107ec9af637d /recipes-core/multitech/config/chat_wrapper
parentf7c8ecbd96ea5e6319cda3f6515ec568c1dc1f06 (diff)
downloadmeta-mlinux-8363839d482602cfca6dda49344abb6b05eeb47c.tar.gz
meta-mlinux-8363839d482602cfca6dda49344abb6b05eeb47c.tar.bz2
meta-mlinux-8363839d482602cfca6dda49344abb6b05eeb47c.zip
Fix COPS=2 code for newer modems
Diffstat (limited to 'recipes-core/multitech/config/chat_wrapper')
-rwxr-xr-xrecipes-core/multitech/config/chat_wrapper3
1 files changed, 2 insertions, 1 deletions
diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper
index 8c2edcc..a693661 100755
--- a/recipes-core/multitech/config/chat_wrapper
+++ b/recipes-core/multitech/config/chat_wrapper
@@ -338,9 +338,10 @@ else
cops=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS?')
result0=$?
- if ((result0 != 0)) || ! [[ $cops =~ ^\+COPS:\ 0, ]] ; then
+ if ((result0 != 0)) || ! [[ $cops =~ ^\+COPS:[[:space:]]0[,[:space:]] ]] ; then
/usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=0'
((WAITREG++))
+ ${LOG} "Cops status was $cops"
${LOG} "Just set COPS=0 so wait ${COPSWAIT} seconds"
sleep ${COPSWAIT}
fi