Created
February 15, 2012 18:00
-
-
Save theterg/1837807 to your computer and use it in GitHub Desktop.
Accenture GSM configurations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# /etc/init.d/ppp: start or stop PPP link. | |
# | |
# If you want PPP started on boot time (most dialup systems won't need it) | |
# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and | |
# follow the instructions in the comments in that file. | |
#test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0 | |
if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi | |
case "$1" in | |
start) | |
echo -n "Starting up PPP link: pppd" | |
if [ "$RUNFILE" = "1" ]; then | |
/etc/ppp/ppp_on_boot & | |
else | |
pppd call provider | |
fi | |
echo "." | |
;; | |
stop) | |
echo -n "Shutting down PPP link: pppd" | |
if [ "$RUNFILE" = "1" ]; then | |
poff | |
else | |
poff provider | |
fi | |
echo "." | |
;; | |
restart|force-reload) | |
echo -n "Restarting PPP link: pppd" | |
if [ "$RUNFILE" = "1" ]; then | |
poff | |
sleep 5 | |
/etc/ppp/ppp_on_boot & | |
else | |
poff provider | |
sleep 5 | |
pppd call provider | |
fi | |
echo "." | |
;; | |
*) | |
echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connection script for Sierra Wireless GSM/UMTS modems | |
# Note: This demo script is setup to work on the Cingular EDGE network | |
# | |
SAY 'Starting Sierra Wireless GSM connect script...\n' | |
SAY '\n' | |
####################################### | |
SAY 'Setting the abort string\n' | |
SAY '\n' | |
# Abort String ------------------------------ | |
ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT 'NO CARRIER' ABORT DELAYED | |
####################################### | |
SAY 'Initializing modem\n' | |
# Modem Initialization | |
'' AT | |
OK ATZ | |
####################################### | |
SAY '\n' | |
SAY 'Setting APN\n' | |
# Access Point Name (APN) | |
# Incorrect APN or CGDCONT can often cause errors in connection. | |
# Below are a bunch of different popular APNs | |
#REG:\s1 AT+cgdcont=1,"IP","proxy" | |
#OK 'AT+CGDCONT=0,"IP","proxy"' | |
#OK 'AT+CGDCONT=1,"IP","proxy"' | |
#OK 'AT+CGDCONT=2,"IP","proxy"' | |
#OK 'AT+CGDCONT=0,"IP","ISP.CINGULAR"' | |
OK 'AT+CGDCONT=1,"IP","Broadband"' | |
#OK 'AT+CGDCONT=2,"IP","ISP.CINGULAR"' | |
####################################### | |
SAY '\n' | |
SAY 'Dialing...\n' | |
# Dial the ISP, this is the common Cingular dial string | |
OK ATD*99# | |
CONNECT '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#make sure to chmod +x me! | |
echo "nameserver 8.8.8.8" > /etc/resolv.conf | |
echo "nameserver 8.8.4.4" >> /etc/resolv.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#make sure to chmod +x me! | |
#This will rekick felix if the link is up and good, otherwise it will try to reconnect. | |
ping -c1 www.google.com | |
if [ "$?" = 0 ]; | |
then | |
logger "[99dnstest] DNS success - ppp link is up" | |
echo 255 > /sys/class/leds/omap3bug\:green\:wifi/brightness | |
echo 0 > /sys/class/leds/omap3bug\:red\:wifi/brightness | |
echo 0 > /sys/class/leds/omap3bug\:blue\:wifi/brightness | |
/etc/init.d/felix restart | |
exit 0 | |
else | |
logger "[99dnstest] Cannot resolve www.google.com after several tries - restarting ppp link" | |
/etc/init.d/ppp restart | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-detach | |
lcp-echo-failure 0 | |
#/dev/ttyUSB3 | |
/dev/ttysierra_data | |
115200 | |
debug | |
defaultroute | |
#usepeerdns | |
#ipcp-no-address | |
#ipcp-no-addresses | |
ipcp-max-failure 4 | |
ipcp-accept-local | |
ipcp-accept-remote | |
#added by John | |
lcp-echo-interval 20 | |
lcp-echo-failure 4 | |
#persist | |
#holdoff 15 | |
logfile /var/volatile/log/pppd.log | |
#defaultroute | |
#replacedefaultroute | |
# AUTHENTICATION | |
# If noauth works, use that, otherwise you have to pass | |
# the user name and password. This is an example of a | |
# standard Cingular user/pw combo | |
noauth | |
#user ISPDA@CINGULARGPRS.COM | |
#password CINGULAR1 | |
crtscts | |
lock | |
connect '/usr/sbin/chat -v -t6 -f /etc/ppp/chats/att_chat' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#make sure to chmod +x me! | |
while [ "$?" -ne 5 ] | |
do | |
sleep 10 | |
pon provider | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -s /etc/ppp/peers/att /etc/ppp/peers/provider |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment