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
committerAndrii Pientsov <andrii.pientsov@globallogic.com>2021-11-17 14:37:50 +0200
commitad74c0876acca9115185390ea942924dd50d4325 (patch)
treee3681f8f69ce5182bddcf6b82f4c0f5eb1760e29 /recipes-core/multitech/config/chat_wrapper
parent1f060beda52daf8ee1d6fab74cad518bec7f1144 (diff)
downloadmeta-mlinux-ad74c0876acca9115185390ea942924dd50d4325.tar.gz
meta-mlinux-ad74c0876acca9115185390ea942924dd50d4325.tar.bz2
meta-mlinux-ad74c0876acca9115185390ea942924dd50d4325.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