Module Name: src
Committed By: christos
Date: Sat Aug 7 20:47:27 UTC 2010
Modified Files:
src/share/examples/pppd: Makefile
Added Files:
src/share/examples/pppd: cosmote3G cosmote3G.chat
Log Message:
Add cosmote examples.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/examples/pppd/Makefile
cvs rdiff -u -r0 -r1.1 src/share/examples/pppd/cosmote3G \
src/share/examples/pppd/cosmote3G.chat
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/examples/pppd/Makefile
diff -u src/share/examples/pppd/Makefile:1.2 src/share/examples/pppd/Makefile:1.3
--- src/share/examples/pppd/Makefile:1.2 Wed Oct 29 08:47:08 2008
+++ src/share/examples/pppd/Makefile Sat Aug 7 16:47:27 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2008/10/29 12:47:08 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2010/08/07 20:47:27 christos Exp $
NOOBJ= # defined
@@ -6,6 +6,7 @@
.if ${MKSHARE} != "no"
FILES= cingular3G cingular3G.chat
+FILES+= cosmote3G cosmote3G.chat
FILES+= telus telus.chat
FILESDIR=/usr/share/examples/pppd
.endif
Added files:
Index: src/share/examples/pppd/cosmote3G
diff -u /dev/null src/share/examples/pppd/cosmote3G:1.1
--- /dev/null Sat Aug 7 16:47:27 2010
+++ src/share/examples/pppd/cosmote3G Sat Aug 7 16:47:27 2010
@@ -0,0 +1,31 @@
+# $NetBSD: cosmote3G,v 1.1 2010/08/07 20:47:27 christos Exp $
+# Script to connect to Cosmote-3G's service.
+# This gets to the point of connected, but never gets to negotiate LCP.
+# I see nothing from the modem. It is here for reference.
+#
+#kdebug 100
+#debug 10000
+/dev/ttyU1 460800
+holdoff 10
+noipv6
+#-vj
+#idle 600
+demand
+#active-filter-out "icmp or (udp and not udp port route) or (tcp and not tcp port ntp)"
+#active-filter-in "icmp or (udp and not udp port route) or (tcp and not tcp port ntp)"
+#pass-filter-in "tcp or (udp and not udp port route) or icmp"
+#pass-filter-out "tcp or (udp and not udp port route) or icmp"
+#netmask 0xffffff00
+ipcp-accept-local
+lcp-echo-failure 0
+lcp-echo-interval 0
+mtu 296
+defaultroute
+crtscts
+modem
+lock
+connect /etc/ppp/connect/cosmote3G.chat
+noauth
+user ""
+password ""
+usepeerdns
Index: src/share/examples/pppd/cosmote3G.chat
diff -u /dev/null src/share/examples/pppd/cosmote3G.chat:1.1
--- /dev/null Sat Aug 7 16:47:27 2010
+++ src/share/examples/pppd/cosmote3G.chat Sat Aug 7 16:47:27 2010
@@ -0,0 +1,21 @@
+#!/bin/sh
+chat -t 100 -v '' 'ATZ' \
+ 'OK' 'AT+CPIN=XXXX'
+
+# Although the modem says ok, it takes a few seconds to negotiate the
+# pin.
+sleep 10
+
+chat -t 100 -v '' 'AT+CGDCONT=1,"IP","internet"' \
+ 'OK' 'ATDT*99***1#' \
+ TIMEOUT 120 \
+ 'CONNECT' '\c'
+
+# 'AT+CPMS?'
+# '+CPMS: "ME",0,100,"ME",0,100,"ME",0,100'
+# Hardware handshake
+# 'OK' 'AT&F &D2 &C1"
+# No answer no timeout
+# 'OK' 'ATS7=60 S30=0 S0=0"
+# Report signal quality.
+# 'OK' 'AT+CSQ'