summaryrefslogtreecommitdiff
path: root/recipes-core/multitech/config/chat_wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/multitech/config/chat_wrapper')
-rwxr-xr-xrecipes-core/multitech/config/chat_wrapper35
1 files changed, 32 insertions, 3 deletions
diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper
index 51f8cc1..b15a949 100755
--- a/recipes-core/multitech/config/chat_wrapper
+++ b/recipes-core/multitech/config/chat_wrapper
@@ -92,6 +92,13 @@ DCOMP="${BASH_REMATCH[6]}" # Optional
HCOMP="${BASH_REMATCH[8]}" # Optional
FULLBOAT="${BASH_REMATCH[9]}" # Optional
+# On some modems there are more parameters than others.
+if [[ $MFULLBOAT != $FULLBOAT ]] ; then
+ ${LOG} "Only the first five context parameters are considered. The rest will be ignored."
+ ${LOG} "modem: \"$MFULLBOAT\""
+ ${LOG} "chat script: \"$FULLBOAT\""
+fi
+
if ((${#DCOMP} == 0)) ; then
((DCOMP=0)) # Default
fi
@@ -102,9 +109,31 @@ fi
# Only update context on a mismatch between chat and modem.
if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \
[[ $MADDR != $ADDR ]] || ((MDCOMP != DCOMP)) || \
- ((MHCOMP != HCOMP)) || \
- [[ $MFULLBOAT != $FULLBOAT ]] ; then
- ${LOG} "Modem context $MPDP,$MAPN,$MADDR,$MDCOMP,$HCOMP does not match chat script"
+ ((MHCOMP != HCOMP)) ; then
+ ${LOG} "Modem context $MPDP,$MAPN,$MADDR,$MDCOMP,$MHCOMP does not match chat script"
+ ${LOG} "Modem context $PDP,$APN,$ADDR,$DCOMP,$HCOMP does not match chat script"
+ if [[ $MPDP != $PDP ]] ; then
+ ${LOG} "PDP mismatch"
+ fi
+ if [[ $MAPN != $APN ]] ; then
+ ${LOG} "APN mismatch"
+ fi
+ if [[ $MADDR != $ADDR ]] ; then
+ ${LOG} "ADDR mismatch"
+ fi
+ if [[ $MDCOMP != $DCOMP ]] ; then
+ ${LOG} "DCOMP mismatch"
+ fi
+ if [[ $MHCOMP != $HCOMP ]] ; then
+ ${LOG} "HCOMP mismatch"
+ fi
+ if [[ $MFULLBOAT != $FULLBOAT ]] ; then
+ ${LOG} "Final parameter mismatches ignored"
+ ${LOG} "Parameter 6 and up on the modem:"
+ ${LOG} "\"${MFULLBOAT}\""
+ ${LOG} "Parameter 6 and up on the chat script:"
+ ${LOG} "\"${FULLBOAT}\""
+ fi
${LOG} "$MCONTEXT"
${LOG} "Dropping registration with carrier to set context"
# Need to deregister