summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@buglabs.net>2010-12-09 16:09:08 +0100
committerStefan Schmidt <stefan@buglabs.net>2011-01-25 12:26:44 +0100
commit45377629e006687a014864403d271e6c265154f8 (patch)
tree8e2233115d19ce7a477dec05f266a2cf0b311af5
parent1f8d2e0f28091d9fdc6afc38d097f8770a257ac0 (diff)
downloadopenembedded-45377629e006687a014864403d271e6c265154f8.tar.gz
buglabs-ppp-scripts: Some scripts to enable BUG for different broadband providers
-rwxr-xr-xrecipes/buglabs/buglabs-ppp-scripts/att33
-rwxr-xr-xrecipes/buglabs/buglabs-ppp-scripts/att_chat40
-rwxr-xr-xrecipes/buglabs/buglabs-ppp-scripts/cdma13
-rwxr-xr-xrecipes/buglabs/buglabs-ppp-scripts/cdma_chat25
-rwxr-xr-xrecipes/buglabs/buglabs-ppp-scripts/ip-down.local18
-rwxr-xr-xrecipes/buglabs/buglabs-ppp-scripts/ip-up.local26
-rw-r--r--recipes/buglabs/buglabs-ppp-scripts/tmobile22
-rw-r--r--recipes/buglabs/buglabs-ppp-scripts/tmobile_chat14
-rw-r--r--recipes/buglabs/buglabs-ppp-scripts/tmobile_disconnect3
-rw-r--r--recipes/buglabs/buglabs-ppp-scripts_0.2.bb29
10 files changed, 223 insertions, 0 deletions
diff --git a/recipes/buglabs/buglabs-ppp-scripts/att b/recipes/buglabs/buglabs-ppp-scripts/att
new file mode 100755
index 0000000000..f940a28888
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/att
@@ -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'
diff --git a/recipes/buglabs/buglabs-ppp-scripts/att_chat b/recipes/buglabs/buglabs-ppp-scripts/att_chat
new file mode 100755
index 0000000000..2c671aee14
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/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 ''
diff --git a/recipes/buglabs/buglabs-ppp-scripts/cdma b/recipes/buglabs/buglabs-ppp-scripts/cdma
new file mode 100755
index 0000000000..ec31f2ba7c
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/cdma
@@ -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'
diff --git a/recipes/buglabs/buglabs-ppp-scripts/cdma_chat b/recipes/buglabs/buglabs-ppp-scripts/cdma_chat
new file mode 100755
index 0000000000..5445454654
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/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 ''
+
diff --git a/recipes/buglabs/buglabs-ppp-scripts/ip-down.local b/recipes/buglabs/buglabs-ppp-scripts/ip-down.local
new file mode 100755
index 0000000000..568c1b62a7
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/ip-down.local
@@ -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
diff --git a/recipes/buglabs/buglabs-ppp-scripts/ip-up.local b/recipes/buglabs/buglabs-ppp-scripts/ip-up.local
new file mode 100755
index 0000000000..7cf2345776
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/ip-up.local
@@ -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
diff --git a/recipes/buglabs/buglabs-ppp-scripts/tmobile b/recipes/buglabs/buglabs-ppp-scripts/tmobile
new file mode 100644
index 0000000000..e547f79319
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/tmobile
@@ -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 \ No newline at end of file
diff --git a/recipes/buglabs/buglabs-ppp-scripts/tmobile_chat b/recipes/buglabs/buglabs-ppp-scripts/tmobile_chat
new file mode 100644
index 0000000000..d9e2ec8261
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/tmobile_chat
@@ -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
diff --git a/recipes/buglabs/buglabs-ppp-scripts/tmobile_disconnect b/recipes/buglabs/buglabs-ppp-scripts/tmobile_disconnect
new file mode 100644
index 0000000000..f1302e2049
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts/tmobile_disconnect
@@ -0,0 +1,3 @@
+"" "\K"
+"" "+++ATH0"
+SAY "GPRS disconnected." \ No newline at end of file
diff --git a/recipes/buglabs/buglabs-ppp-scripts_0.2.bb b/recipes/buglabs/buglabs-ppp-scripts_0.2.bb
new file mode 100644
index 0000000000..5dad570857
--- /dev/null
+++ b/recipes/buglabs/buglabs-ppp-scripts_0.2.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "PPP Scripts for BUG"
+LICENSE = "GPL"
+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 \
+ "
+
+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/
+}