From aeff918a70b2334ef8456fb4fcc4ae296e2fb1c1 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Aug 2019 11:53:01 -0500 Subject: Fix chat_wrapper for L4E1 --- recipes-core/multitech/config/chat_wrapper | 35 +++++++++++++++++++++++++++--- 1 file 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 -- cgit v1.2.3