From 763eca71b333eb09f309bef57316a0a90472db48 Mon Sep 17 00:00:00 2001 From: saeedjohar Date: Thu, 22 Oct 2020 13:48:14 +0300 Subject: [PATCH] 1. Removed #EXTRA from the chat-connect 2. Added -y for ppp installation 3. Removed unused commands --- README.md | 4 ++++ ppp_installer/chat-connect | 1 - ppp_installer/install.sh | 22 +--------------------- ppp_installer/install_ppp_jetson.sh | 3 +-- ppp_installer/install_supersim.sh | 1 - 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index a92ee99..a5fce33 100644 --- a/README.md +++ b/README.md @@ -66,3 +66,7 @@ In this step you will enter your PORT. e.g For 3G, 4G/LTE Base Shield it will be This option allows you to connect to Internet via your shield automatically when your Raspberry Pi Starts. If you want to connect to Internet automatically type Y else n. If you have selected n then you will need to run `sudo pon` to connect to internet and `sudo poff` to stop it.  Enjoy your Internet connection. + +Important Links: +* [Linux PPP HOW TO](https://tldp.org/HOWTO/PPP-HOWTO/index.html) +* [PAP CHAP authentications](https://tldp.org/HOWTO/PPP-HOWTO/pap.html) diff --git a/ppp_installer/chat-connect b/ppp_installer/chat-connect index a805329..f3e4a59 100644 --- a/ppp_installer/chat-connect +++ b/ppp_installer/chat-connect @@ -7,7 +7,6 @@ ABORT "NO ANSWER" TIMEOUT 30 "" AT OK ATE0 -#EXTRA OK ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2 OK AT+CGDCONT=1,"IP","\T",,0,0 OK ATD*99# diff --git a/ppp_installer/install.sh b/ppp_installer/install.sh index 02ce21a..579535f 100755 --- a/ppp_installer/install.sh +++ b/ppp_installer/install.sh @@ -25,24 +25,6 @@ case $shield_hat in *) echo "${RED}Wrong Selection, exiting${SET}"; exit 1; esac -if [ $shield_hat -eq 3 ] || [ $shield_hat -eq 4 ]; then - echo "${YELLOW}Please choose LTE Technology:${SET}" - echo "${YELLOW}1: GPRS/EDGE${SET}" - echo "${YELLOW}2: CATM1${SET}" - echo "${YELLOW}3: NB-IoT${SET}" - - read network_technology - case $network_technology in - 1) echo "${YELLOW}You chose GPRS/EDGE${SET}" - EXTRA='OK AT+QCFG="band",F,400A0E189F,A0E189F,1\nOK AT+QCFG="nwscanseq",01,1\nOK AT+QCFG="nwscanmode",1,1\nOK AT+QCFG="iotopmode",2,1';; - 2) echo "${YELLOW}You chose CATM1${SET}" - EXTRA='OK AT+QCFG="band",F,400A0E189F,A0E189F,1\nOK AT+QCFG="nwscanseq",02,1\nOK AT+QCFG="nwscanmode",3,1\nOK AT+QCFG="iotopmode",0,1';; - 3) echo "${YELLOW}You chose NB-IoT${SET}" - EXTRA='OK AT+QCFG="band",F,400A0E189F,A0E189F,1\nOK AT+QCFG="nwscanseq",03,1\nOK AT+QCFG="nwscanmode",3,1\nOK AT+QCFG="iotopmode",1,1';; - *) echo "{RED}Wrong Selection, exiting${SET}"; exit 1; - esac -fi - echo "${YELLOW}Downloading setup files${SET}" wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/master/ppp_installer/chat-connect -O chat-connect @@ -66,7 +48,7 @@ if [ $? -ne 0 ]; then fi echo "${YELLOW}ppp and wiringpi (gpio tool) install${SET}" -apt-get install ppp wiringpi +apt install ppp wiringpi -y echo "${YELLOW}What is your carrier APN?${SET}" read carrierapn @@ -101,8 +83,6 @@ read devicename mkdir -p /etc/chatscripts -sed -i "/#EXTRA/d" chat-connect - mv chat-connect /etc/chatscripts/ mv chat-disconnect /etc/chatscripts/ diff --git a/ppp_installer/install_ppp_jetson.sh b/ppp_installer/install_ppp_jetson.sh index d85aecd..5127f80 100755 --- a/ppp_installer/install_ppp_jetson.sh +++ b/ppp_installer/install_ppp_jetson.sh @@ -49,7 +49,7 @@ if [ $? -ne 0 ]; then fi echo "${YELLOW}ppp install${SET}" -apt-get install ppp +apt-get install ppp -y echo "${YELLOW}What is your carrier APN?${SET}" read carrierapn @@ -83,7 +83,6 @@ echo "${YELLOW}What is your device communication PORT? (ttyS0/ttyUSB3/etc.)${SET read devicename mkdir -p /etc/chatscripts -sed -i "/#EXTRA/d" chat-connect mv chat-connect /etc/chatscripts/ mv chat-disconnect /etc/chatscripts/ diff --git a/ppp_installer/install_supersim.sh b/ppp_installer/install_supersim.sh index aa1e25a..297e239 100644 --- a/ppp_installer/install_supersim.sh +++ b/ppp_installer/install_supersim.sh @@ -33,7 +33,6 @@ echo "${YELLOW}ppp and wiringpi (gpio tool) install${SET}" apt install ppp wiringpi -y mkdir -p /etc/chatscripts -sed -i "/#EXTRA/d" chat-connect mv chat-connect /etc/chatscripts/ mv chat-disconnect /etc/chatscripts/