[oe-commits] org.oe.dev ppp-gprs 1.0: Set of pppd configs to easy connect to GPRS.
pfalcon commit
openembedded-commits at lists.openembedded.org
Mon Jan 14 23:17:42 UTC 2008
ppp-gprs 1.0: Set of pppd configs to easy connect to GPRS.
* ... Eventually from anywhere in the world ;-).
* These are indended to be light and easy. Please add only what's
really required, not some gossip commands here.
* Tested to work.
Author: pfalcon at openembedded.org
Branch: org.openembedded.dev
Revision: a7359f472c5c0a825dca66ebe818ef0c7203a3a1
ViewMTN: http://monotone.openembedded.org/revision/info/a7359f472c5c0a825dca66ebe818ef0c7203a3a1
Files:
1
packages/ppp/ppp-gprs
packages/ppp/ppp-gprs/chats
packages/ppp/ppp-gprs/peers
packages/ppp/ppp-gprs/chats/chat-gprs
packages/ppp/ppp-gprs/peers/_gprs
packages/ppp/ppp-gprs/peers/_gprs-ap-internet
packages/ppp/ppp-gprs_1.0.bb
Diffs:
#
# mt diff -rb144146d96293ddc0c8140f894293debe08cc3af -ra7359f472c5c0a825dca66ebe818ef0c7203a3a1
#
#
#
# add_dir "packages/ppp/ppp-gprs"
#
# add_dir "packages/ppp/ppp-gprs/chats"
#
# add_dir "packages/ppp/ppp-gprs/peers"
#
# add_file "packages/ppp/ppp-gprs/chats/chat-gprs"
# content [3c17c4742880eb980b1f32c5bfb8ec89be225b16]
#
# add_file "packages/ppp/ppp-gprs/peers/_gprs"
# content [b8d56b83b8ed0db469e296a2adb24896adf7ebf3]
#
# add_file "packages/ppp/ppp-gprs/peers/_gprs-ap-internet"
# content [7ec04eac6aae50cf06036988b2d63e7f754abcd2]
#
# add_file "packages/ppp/ppp-gprs_1.0.bb"
# content [698b8ad36ea9b264cbdc9d217158f578b0635aaf]
#
============================================================
--- packages/ppp/ppp-gprs/chats/chat-gprs 3c17c4742880eb980b1f32c5bfb8ec89be225b16
+++ packages/ppp/ppp-gprs/chats/chat-gprs 3c17c4742880eb980b1f32c5bfb8ec89be225b16
@@ -0,0 +1,9 @@
+# GPRS AP (Access Point) name should be passed via -T switch
+
+'' ATZ
+OK AT+CGDCONT=1,"IP","\T"
+# We setup profile #1 in the above command, and then use it to call
+# GPRS. This is correct, but some buggy phone may parse only "ATD*99#"
+OK "ATD*99***1#"
+# OK "ATD*99#"
+CONNECT ''
============================================================
--- packages/ppp/ppp-gprs/peers/_gprs b8d56b83b8ed0db469e296a2adb24896adf7ebf3
+++ packages/ppp/ppp-gprs/peers/_gprs b8d56b83b8ed0db469e296a2adb24896adf7ebf3
@@ -0,0 +1,68 @@
+# This is generic pppd config for GPRS connection
+# To connect to specific provider, one
+# more provider-specific config
+# file is required, which will
+# usually just set chat utility params
+# to make connection and call this one.
+# (And in most cases that will be symlink
+# to a file with well-known settings).
+#
+# Usage:
+# pppd <modem_device> call gprs call <country>-<provider>
+# where /etc/ppp/peers/<country>-<provider> ends with line
+# "call _gprs"
+# Example:
+# pppd /dev/rfcomm0 call ua-life
+# Debugging PPP protocol problems:
+# pppd /dev/rfcomm0 call ua-life debug nodetach
+#
+# By default, pppd will go to
+# background once connection is
+# established. 'nodetach' option will
+# prevent this. If you want pppd to
+# even establish connection in
+# background, comment 'updetach' below.
+#
+# To finish connection, use Ctrl+C if
+# 'nodetach' was used, or
+# kill `head -1 /var/run/ppp-gprs.pid`
+# otherwise. If you are sure there is
+# only one pppd connection, you can use
+# killall pppd
+
+##
+## pppd options
+##
+
+# create /var/run/ppp-gprs.pid
+# with pid for this connection
+linkname gprs
+# Connect in foreground, but go
+# to background after that
+updetach
+
+# Treat port as a modem and use
+# reasonable speed
+modem
+crtscts
+115200
+
+# Don't do CCP (compression)
+# negotiation, some providers are
+# rumored to be buggy with this, and
+# most of the rest simply don't support.
+noccp
+# We don't request provider to auth
+# to us
+noauth
+# Don't try to make up our IP address
+noipdefault
+# We want provider to supply us with
+# IP addresses
+ipcp-accept-remote
+ipcp-accept-local
+# Ask provider for DNS and use it
+usepeerdns
+# Route all Internet traffic thru
+# this connection
+defaultroute
============================================================
--- packages/ppp/ppp-gprs/peers/_gprs-ap-internet 7ec04eac6aae50cf06036988b2d63e7f754abcd2
+++ packages/ppp/ppp-gprs/peers/_gprs-ap-internet 7ec04eac6aae50cf06036988b2d63e7f754abcd2
@@ -0,0 +1,3 @@
+# -T options sets value of GPRS AP name. Change this for your cell provider
+connect '/usr/sbin/chat -V -f /etc/ppp/chats/chat-gprs -T internet'
+call gprs
============================================================
--- packages/ppp/ppp-gprs_1.0.bb 698b8ad36ea9b264cbdc9d217158f578b0635aaf
+++ packages/ppp/ppp-gprs_1.0.bb 698b8ad36ea9b264cbdc9d217158f578b0635aaf
@@ -0,0 +1,22 @@
+SECTION = "console/network"
+DESCRIPTION = "PPP scripts for easy GPRS connection"
+LICENSE = "GPL"
+RDEPENDS = "ppp"
+PR = "r1"
+
+SRC_URI = "file://peers/* file://chats/*"
+
+do_install () {
+ install -d ${D}${sysconfdir}/ppp/peers/
+ install -d ${D}${sysconfdir}/ppp/chats/
+ install -m 0644 ${WORKDIR}/peers/* ${D}${sysconfdir}/ppp/peers/
+ install -m 0644 ${WORKDIR}/chats/* ${D}${sysconfdir}/ppp/chats/
+
+ # Add links for providers sharing same well-known config
+ ln -sf _gprs-ap-internet ${D}${sysconfdir}/ppp/peers/ua-life
+}
+
+PACKAGE_ARCH = "all"
+
+# In worst case, user may need to edit anything
+CONFFILES_${PN} = "${sysconfdir}/ppp/peers/_gprs ${sysconfdir}/ppp/chats/chat-gprs"
More information about the Openembedded-commits
mailing list