From 8363839d482602cfca6dda49344abb6b05eeb47c Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 26 Oct 2021 09:42:37 -0500 Subject: Fix COPS=2 code for newer modems --- recipes-core/multitech/config/chat_wrapper | 3 ++- recipes-core/multitech/config/chat_wrapper.default | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 diff --git a/recipes-core/multitech/config/chat_wrapper.default b/recipes-core/multitech/config/chat_wrapper.default index 164086a..b6e7f33 100644 --- a/recipes-core/multitech/config/chat_wrapper.default +++ b/recipes-core/multitech/config/chat_wrapper.default @@ -28,3 +28,8 @@ COPSWAIT=10 # How long to wait when CFUN is set to 1 CFUNWAIT=10 + +# Set AT&T Data mode. Modem must be in +# data mode when using an AT&T SIM +SETATTDATAMODE=1 + -- cgit v1.2.3