Permalink
Browse files

buglabs-ppp-scripts: Helper scripts for setting up PPP connections on…

… various providers

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
  • Loading branch information...
1 parent 43f9625 commit c9fe7c15b1a5326dc72a005006a60b55efaf5f65 @Stefan-Schmidt Stefan-Schmidt committed Nov 29, 2011

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,33 @@
+-detach
+lcp-echo-failure 0
+/dev/ttyUSB3
+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/peers/att_chat'
@@ -0,0 +1,40 @@
+# 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","WAP.CINGULAR"'
+#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 ''
@@ -0,0 +1,13 @@
+-detach
+lcp-echo-failure 0
+noauth
+/dev/ttyUSB0
+115200
+debug
+defaultroute
+ipcp-accept-local
+ipcp-accept-remote
+usepeerdns
+crtscts
+lock
+connect '/usr/sbin/chat -v -t6 -f /etc/ppp/peers/cdma_chat'
@@ -0,0 +1,25 @@
+# Connection script for Sierra Wireless CDMA/EVDO modems
+# Note: This demo script is setup to work on Verizon and Sprint
+# Networks.
+#
+SAY 'Starting Sierra Wireless CDMA 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 'Dialing...\n'
+OK ATDT#777
+CONNECT ''
+
@@ -0,0 +1,18 @@
+#!/bin/bash
+# latest-kernel-support: 2.6.18
+# Author: Kevin Lloyd <linux@sierrawireless.com>
+# Date: 10/20/2006
+
+if [ $# -eq 0 ]; then
+ exit 1
+fi
+
+if [ $1 = ppp0 ]; then
+ mv -f /etc/resolv.conf /etc/resolv.conf.ppp0
+ if [ -e /etc/resolv.conf.orig ]; then
+ cp /etc/resolv.conf.orig /etc/resolv.conf
+ else
+ grep -v ppp0 /etc/resolv.conf.ppp0 > /etc/resolv.conf
+ fi
+ chmod a+r /etc/resolv.conf
+fi
@@ -0,0 +1,26 @@
+#!/bin/bash
+# latest-kernel-support: 2.6.18
+# Author: Kevin Lloyd <linux@sierrawireless.com>
+# Date: 10/20/2006
+
+if [ $# -eq 0 ]; then
+ exit 1
+fi
+
+if [ $1 = ppp0 ]; then
+ if [ -e /var/run/ppp/resolv.conf ]; then
+ grep -v ppp0 /etc/resolv.conf > /etc/resolv.conf.orig
+
+ echo \#These entries are from the ppp0 connection > /etc/resolv.conf
+ sed -e 's/$/ #ppp0 entry/g' /var/run/ppp/resolv.conf >> /etc/resolv.conf
+ cat /etc/resolv.conf.orig >> /etc/resolv.conf
+ chmod a+r /etc/resolv.conf
+ elif [ -e /etc/ppp/resolv.conf ]; then
+ grep -v ppp0 /etc/resolv.conf > /etc/resolv.conf.orig
+
+ echo \#These entries are from the ppp0 connection > /etc/resolv.conf
+ sed -e 's/$/ #ppp0 entry/g' /etc/ppp/resolv.conf >> /etc/resolv.conf
+ cat /etc/resolv.conf.orig >> /etc/resolv.conf
+ chmod a+r /etc/resolv.conf
+ fi
+fi
@@ -0,0 +1,22 @@
+# File: /etc/ppp/peers/tmobile
+#
+/dev/ttyUSB3
+115200
+crtscts
+lock
+hide-password
+defaultroute # set the default route
+usepeerdns
+holdoff 3
+ipcp-accept-local
+lcp-echo-failure 12
+lcp-echo-interval 3
+noauth
+noipdefault
+novj
+novjccomp
+replacedefaultroute
+debug
+
+connect "/usr/sbin/chat -v -f /etc/ppp/peers/tmobile_chat"
+disconnect "/usr/sbin/chat -v -f /etc/ppp/peers/tmobile_disconnect
@@ -0,0 +1,14 @@
+TIMEOUT 10
+ABORT 'BUSY'
+ABORT 'NO ANSWER'
+ABORT 'ERROR'
+SAY 'Starting GPRS connect script\n'
+
+""'ATZ'
+SAY 'Setting APN\n'
+OK 'AT+CGDCONT=1,"IP","internet2.voicestream.com"'
+
+ABORT 'NO CARRIER'
+SAY 'Dialing...\n'
+OK 'ATD*99***1#'
+CONNECT
@@ -0,0 +1,3 @@
+"" "\K"
+"" "+++ATH0"
+SAY "GPRS disconnected."
@@ -0,0 +1,31 @@
+DESCRIPTION = "PPP Scripts for BUG"
+LICENSE = "GPL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+RDEPENDS_${PN} = "udev"
+PR = "r0"
+
+SRC_URI = "file://att \
+ file://att_chat \
+ file://ip-down.local \
+ file://ip-up.local \
+ file://cdma \
+ file://cdma_chat \
+ file://tmobile \
+ file://tmobile_chat \
+ file://tmobile_disconnect \
+ file://COPYING \
+ "
+
+S = ${WORKDIR}
+
+PACKAGE_ARCH = "all"
+
+do_install() {
+ install -d ${D}/etc
+ install -d ${D}/etc/ppp
+ install -d ${D}/etc/ppp/peers
+ install -m 0644 att* ${D}/etc/ppp/peers
+ install -m 0644 ip* ${D}/etc/ppp
+ install -m 0644 tmobile* ${D}/etc/ppp/peers
+ install -m 0644 cdma* ${D}/etc/ppp/peers/
+}

0 comments on commit c9fe7c1

Please sign in to comment.