From 344a262d83c358f9dcc645b4890dded3e14ec88a Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Mon, 4 Apr 2016 15:16:43 -0500 Subject: ppp:feat: add lvw2 chat script --- .../mlinux-scripts-1.0/mlinux-set-apn | 8 +++++--- recipes-core/multitech/config/ppp/peers/lvw2 | 11 +++++++++++ recipes-core/multitech/config/ppp/peers/lvw2_chat | 22 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 recipes-core/multitech/config/ppp/peers/lvw2 create mode 100644 recipes-core/multitech/config/ppp/peers/lvw2_chat diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn index 371ba7e..65e01b8 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn @@ -26,15 +26,17 @@ if [[ $# != 1 ]]; then fi apn=$1 -chat_file=/etc/ppp/peers/gsm_chat +gsm_chat_file=/etc/ppp/peers/gsm_chat +lvw2_chat_file=/etc/ppp/peers/lvw2_chat -sed -r -i "s/^OK\s+'AT\+CGDCONT=1,\"IP\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=1,\"IP\",\"${apn}\"'/" $chat_file +sed -r -i "s/^OK\s+'AT\+CGDCONT=1,\"IP\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=1,\"IP\",\"${apn}\"'/" $gsm_chat_file +sed -r -i "s/^OK\s+'AT\+CGDCONT=3,\"IPV4V6\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=3,\"IPV4V6\",\"${apn}\"'/" $lvw2_chat_file if [[ $? != 0 ]]; then echo "Failed to change APN" exit 1 else - echo "Set APN to \"${apn}\" in $chat_file" + echo "Set APN to \"${apn}\" in $gsm_chat_file and $lvw2_chat_file" fi exit 0 diff --git a/recipes-core/multitech/config/ppp/peers/lvw2 b/recipes-core/multitech/config/ppp/peers/lvw2 new file mode 100644 index 0000000..773f1dd --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/lvw2 @@ -0,0 +1,11 @@ +linkname ppp0 +230400 +defaultroute +replacedefaultroute +usepeerdns +ipcp-max-failure 10 +ipcp-restart 10 +noauth +crtscts +novj +connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lvw2_chat' diff --git a/recipes-core/multitech/config/ppp/peers/lvw2_chat b/recipes-core/multitech/config/ppp/peers/lvw2_chat new file mode 100644 index 0000000..f5eb7a0 --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/lvw2_chat @@ -0,0 +1,22 @@ +SAY "LVW2 chat\n" +ECHO OFF +ABORT 'NO DIAL TONE' +ABORT 'NO DIALTONE' +ABORT 'NO ANSWER' +ABORT 'NO CARRIER' +ABORT 'DELAYED' +ABORT 'VOICE' +ABORT 'BUSY' +'' 'AT' +OK 'ATZ' +OK 'AT+CSQ' +# ---------------------------------- +# Set the APN for your provider here +# ---------------------------------- +OK 'AT+CGDCONT=3,"IPV4V6","vzwinternet"' +SAY "Dialing...\n" +OK 'ATD*99***3#' +SAY "Waiting for CONNECT...\n" +TIMEOUT 120 +CONNECT '' +SAY "Connected\n" -- cgit v1.2.3