1. Removed #EXTRA from the chat-connect

2. Added -y for ppp installation
3. Removed unused commands
This commit is contained in:
saeedjohar 2020-10-22 13:48:14 +03:00
parent e49d022dbf
commit 763eca71b3
5 changed files with 6 additions and 25 deletions

View File

@ -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.  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. 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)

View File

@ -7,7 +7,6 @@ ABORT "NO ANSWER"
TIMEOUT 30 TIMEOUT 30
"" AT "" AT
OK ATE0 OK ATE0
#EXTRA
OK ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2 OK ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2
OK AT+CGDCONT=1,"IP","\T",,0,0 OK AT+CGDCONT=1,"IP","\T",,0,0
OK ATD*99# OK ATD*99#

View File

@ -25,24 +25,6 @@ case $shield_hat in
*) echo "${RED}Wrong Selection, exiting${SET}"; exit 1; *) echo "${RED}Wrong Selection, exiting${SET}"; exit 1;
esac 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}" 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 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 fi
echo "${YELLOW}ppp and wiringpi (gpio tool) install${SET}" 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}" echo "${YELLOW}What is your carrier APN?${SET}"
read carrierapn read carrierapn
@ -101,8 +83,6 @@ read devicename
mkdir -p /etc/chatscripts mkdir -p /etc/chatscripts
sed -i "/#EXTRA/d" chat-connect
mv chat-connect /etc/chatscripts/ mv chat-connect /etc/chatscripts/
mv chat-disconnect /etc/chatscripts/ mv chat-disconnect /etc/chatscripts/

View File

@ -49,7 +49,7 @@ if [ $? -ne 0 ]; then
fi fi
echo "${YELLOW}ppp install${SET}" echo "${YELLOW}ppp install${SET}"
apt-get install ppp apt-get install ppp -y
echo "${YELLOW}What is your carrier APN?${SET}" echo "${YELLOW}What is your carrier APN?${SET}"
read carrierapn read carrierapn
@ -83,7 +83,6 @@ echo "${YELLOW}What is your device communication PORT? (ttyS0/ttyUSB3/etc.)${SET
read devicename read devicename
mkdir -p /etc/chatscripts mkdir -p /etc/chatscripts
sed -i "/#EXTRA/d" chat-connect
mv chat-connect /etc/chatscripts/ mv chat-connect /etc/chatscripts/
mv chat-disconnect /etc/chatscripts/ mv chat-disconnect /etc/chatscripts/

View File

@ -33,7 +33,6 @@ echo "${YELLOW}ppp and wiringpi (gpio tool) install${SET}"
apt install ppp wiringpi -y apt install ppp wiringpi -y
mkdir -p /etc/chatscripts mkdir -p /etc/chatscripts
sed -i "/#EXTRA/d" chat-connect
mv chat-connect /etc/chatscripts/ mv chat-connect /etc/chatscripts/
mv chat-disconnect /etc/chatscripts/ mv chat-disconnect /etc/chatscripts/