<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zombiehugs* &#187; linux</title>
	<atom:link href="http://www.zombiehugs.com/codetopics/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zombiehugs.com</link>
	<description>code solutions from a code dunce</description>
	<lastBuildDate>Tue, 26 Nov 2013 15:47:32 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.7.41</generator>
	<item>
		<title>PPP with Telit GM862 (AT&amp;T)</title>
		<link>http://www.zombiehugs.com/2011/04/ppp-with-telit-gm862-att/</link>
		<comments>http://www.zombiehugs.com/2011/04/ppp-with-telit-gm862-att/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 02:03:56 +0000</pubDate>
		<dc:creator><![CDATA[gerdsen]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[ppp]]></category>
		<category><![CDATA[telit]]></category>

		<guid isPermaLink="false">http://www.zombiehugs.com/?p=8</guid>
		<description><![CDATA[I thought I would share my experience with connecting to AT&#38;T&#8217;s wireless network via Telit GM862 radio over PPP. It is safe to assume this will work for anyone else using another form of GSM device on AT&#38;T&#8217;s network. While there are a couple of posts and a couple of threads that explain what you [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I thought I would share my experience with connecting to AT&amp;T&#8217;s wireless network via Telit GM862 radio over PPP. It is safe to assume this will work for anyone else using another form of GSM device on AT&amp;T&#8217;s network.</p>
<p>While there are a couple of posts and a couple of threads that explain what you will need to do to achieve this I decide that it would just be best if I flat out pasted my settings files and was verbatim about the entire situation as it was a headache for me to nail it down.</p>
<p>First step is to ensure you have PPP installed, if you do not you will need to download.</p>
<p><strong>Install PPP</strong></p>
<pre>root:~# apt-get update
root:~# apt-get install ppp</pre>
<p>Next navigate to your provider file, it should be located in <strong>/etc/ppp/peers/provider</strong> and edit it to contain the proper information. I have changed the serial device to reflect the proper device, mine was <strong>/dev/ttyS1</strong> you might find yours to be mounted elsewhere. Also I have changed the call string to <strong>*99***1#&#8221;</strong></p>
<p><strong>/etc/ppp/peers/provider contents</strong></p>
<pre># This is the default configuration used by pon(1) and poff(1).
# See the manual page pppd(8) for information on all the options.

# MUST CHANGE: replace myusername@realm with the PPP login name given to
# your by your provider.
# There should be a matching entry with the password in /etc/ppp/pap-secrets
# and/or /etc/ppp/chap-secrets.
user "WAP@CINGULARGPRS.COM"

# MUST CHANGE: replace ******** with the phone number of your provider.
# The /etc/chatscripts/pap chat script may be modified to change the
# modem initialization string.
connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T *99***1#"

# Serial device to which the modem is connected.
/dev/ttyS1

# Speed of the serial line.
115200

# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute

# Makes pppd "dial again" when the connection is lost.
persist

# Do not ask the remote to authenticate.
noauth</pre>
<p>Next let&#8217;s edit our <strong>pap</strong> file which is located in <strong>/etc/chatscripts/pap</strong>. Copy and paste, overwriting what is currently in there with what you see below.</p>
<p><strong>/etc/chatscripts/pap contents<br />
</strong></p>
<pre># You can use this script unmodified to connect to sites which allow
# authentication via PAP, CHAP and similar protocols.
# This script can be shared among different pppd peer configurations.
# To use it, add something like this to your /etc/ppp/peers/ file:
#
# connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T PHONE-NUMBER"
# user YOUR-USERNAME-IN-PAP-SECRETS
# noauth

# Uncomment the following line to see the connect speed.
# It will be logged to stderr or to the file specified with the -r chat option.
#REPORT		CONNECT

TIMEOUT         60
ABORT        BUSY
ABORT        VOICE
ABORT        "ERROR"
ABORT        "NO CARRIER"
ABORT        "NO DIALTONE"
ABORT        "NO DIAL TONE"
""        ATZ
OK              AT+CGDCONT=1,"IP","WAP.CINGULAR"
#,"0.0.0.0",0,0
OK        ATD*99***1#
CONNECT</pre>
<p>Next we are going to edit our pap-secrets file which can be found in<strong>/etc/ppp/pap-secrets</strong>. Here we are going to make sure our user has access to pppd, I am running on an embedded linux board that automatically boots to root so I have documented him out so I have access. Also we are going to add our user and password that we inserted into provider file. This must match for authentication to work.</p>
<p><strong>/</strong><strong>etc/ppp/</strong><strong>pap-secrets contents </strong></p>
<pre>#
# /etc/ppp/pap-secrets
#
# This is a pap-secrets file to be used with the AUTO_PPP function of
# mgetty. mgetty-0.99 is preconfigured to startup pppd with the login option
# which will cause pppd to consult /etc/passwd (and /etc/shadow in turn)
# after a user has passed this file. Don't be disturbed therefore by the fact
# that this file defines logins with any password for users. /etc/passwd
# (again, /etc/shadow, too) will catch passwd mismatches.
#
# This file should block ALL users that should not be able to do AUTO_PPP.
# AUTO_PPP bypasses the usual login program so it's necessary to list all
# system userids with regular passwords here.
#
# ATTENTION: The definitions here can allow users to login without a
# password if you don't use the login option of pppd! The mgetty Debian
# package already provides this option; make sure you don't change that.

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
*	hostname	""	*

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest	hostname	"*"	-
master	hostname	"*"	-
#root	hostname	"*"	-
support	hostname	"*"	-
stats	hostname	"*"	-

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.

'WAP@CINGULARGRPS.COM'	*	'CINGULAR1'	*</pre>
<p>Lastly we are going to edit our chap-secrets file, which can be found in the same directory as above. I have removed all other information found in here and added only the AT&amp;T information necessary.</p>
<p><strong>/</strong><strong>etc/ppp/</strong><strong>chap-secrets contents</strong></p>
<pre># Secrets for authentication using CHAP
# client	server	secret			IP addresses
WAP@CINGULARGPRS.COM WAP.CINGULAR CINGULAR1</pre>
<p>Now you are ready to rock and roll on AT&amp;T&#8217;s 3G network using your GSM device. To initiate the connect you will issue the <strong><em>pon</em></strong> command from the terminal. To kill the connection you will issue the <strong><em>poff</em></strong> command from the terminal.</p>
<p>By typing <strong><em>plog</em></strong> you can see the last entries in the ppp log. This will help you to verify that it is working, or also to tell if there is an error occuring.</p>
<p><strong>starting ppp and checking the ppp log</strong></p>
<pre>root:~# pon
root:~# plog
Apr  5 12:37:33 localhost pppd[1289]: pppd 2.4.4 started by root, uid 0
Apr  5 12:37:34 localhost chat[1290]: timeout set to 60 seconds
Apr  5 12:37:34 localhost chat[1290]: abort on (BUSY)
Apr  5 12:37:34 localhost chat[1290]: abort on (VOICE)
Apr  5 12:37:34 localhost chat[1290]: abort on (ERROR)
Apr  5 12:37:34 localhost chat[1290]: abort on (NO CARRIER)
Apr  5 12:37:34 localhost chat[1290]: abort on (NO DIALTONE)
Apr  5 12:37:34 localhost chat[1290]: abort on (NO DIAL TONE)
Apr  5 12:37:34 localhost chat[1290]: send (ATZ^M)
Apr  5 12:37:34 localhost chat[1290]: expect (OK)
Apr  5 12:37:34 localhost chat[1290]: ATZ^M^M
Apr  5 12:37:34 localhost chat[1290]: OK
Apr  5 12:37:34 localhost chat[1290]:  -- got it
Apr  5 12:37:34 localhost chat[1290]: send (AT+CGDCONT=1,"IP","wap.cingular","0.0.0.0",0,0^M)
Apr  5 12:37:35 localhost chat[1290]: expect (OK)
Apr  5 12:37:35 localhost chat[1290]: ^M
Apr  5 12:37:35 localhost chat[1290]: AT+CGDCONT=1,"IP","wap.cingular","0.0.0.0",0,0^M^M
Apr  5 12:37:35 localhost chat[1290]: OK
Apr  5 12:37:35 localhost chat[1290]:  -- got it
Apr  5 12:37:35 localhost chat[1290]: send (ATD*99***1#^M)
Apr  5 12:37:35 localhost chat[1290]: expect (CONNECT)
Apr  5 12:37:35 localhost chat[1290]: ^M
Apr  5 12:37:35 localhost chat[1290]: ATD*99***1#^M^M
Apr  5 12:37:35 localhost chat[1290]: CONNECT
Apr  5 12:37:35 localhost chat[1290]:  -- got it
Apr  5 12:37:35 localhost chat[1290]: send (^M)
Apr  5 12:37:35 localhost pppd[1289]: Serial connection established.
Apr  5 12:37:35 localhost pppd[1289]: Using interface ppp0
Apr  5 12:37:35 localhost pppd[1289]: Connect: ppp0 &lt;--&gt; /dev/ttyS1
Apr  5 12:37:36 localhost pppd[1289]: Remote message: Welcome!
Apr  5 12:37:36 localhost pppd[1289]: PAP authentication succeeded
Apr  5 12:37:40 localhost pppd[1289]: local  IP address 10.11.53.134
Apr  5 12:37:40 localhost pppd[1289]: remote IP address 192.168.0.129
Apr  5 12:37:40 localhost pppd[1289]: primary   DNS address 68.105.28.11
Apr  5 12:37:40 localhost pppd[1289]: secondary DNS address 68.105.29.11</pre>
<p>You can also issue <strong><em>ifconfig</em></strong> to list all your network interfaces to double check that your ppp0 interface has received the proper addressing.</p>
<p>Remember, to kill this connection simply type <strong><em>poff</em></strong> at the terminal.<br />
<strong><br />
</strong></p>
<h3><strong>Side notes:</strong></h3>
<p>Some of you may have problems connecting to web resources and other web objects once establishing a connection even though you have the proper information. This could be due to information in your <strong>route</strong>, to ensure GPRS routing make sure that you don&#8217;t have any default gateways set up in your route. To find out type <strong><em>route</em></strong> in the terminal.<br />
<strong><br />
Removing default gateway</strong></p>
<pre>root:~# route
Kernel IP routing table
Destination     Gateway       Genmask         Flags Metric R  ef    Use   Iface
192.168.1.0     *             255.255.255.0   U      0        0      0    eth0
default         191.168.0.1   0.0.0.0         UG     0        0      0    eth0
root:~# route del default gw 192.168.0.1 eth0
root:~#</pre>
<div class="hugs"><(x_-)></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zombiehugs.com/2011/04/ppp-with-telit-gm862-att/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
