<?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>Erning.write() &#187; cdma</title>
	<atom:link href="http://erning.net/tags/cdma/feed" rel="self" type="application/rss+xml" />
	<link>http://erning.net</link>
	<description>Reloading</description>
	<lastBuildDate>Fri, 18 Jun 2010 18:05:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Gentoo Linux Dailup Internet by CDMA Phone</title>
		<link>http://erning.net/archives/gentoo-linux-dailup-internet-by-cdma-phone</link>
		<comments>http://erning.net/archives/gentoo-linux-dailup-internet-by-cdma-phone#comments</comments>
		<pubDate>Fri, 18 Nov 2005 11:49:41 +0000</pubDate>
		<dc:creator>erning</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[cdma]]></category>
		<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://www.erning.net/archives/2005/11/18/gentoo-linux-dailup-internet-by-cdma-phone/</guid>
		<description><![CDATA[My CDMA phone connects to the laptop via a USB cable. So I have to configurate the kernel with USB Modem support. Device Drivers --> USB support --> [M] Support for Host-side USB [M] USB Modem (CDC ACM) support Check if the device is well reconized after install and modprobe the module(cdc_acm). # dmesg &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>My CDMA phone connects to the laptop via a USB cable.  So I have to configurate the kernel with USB Modem support.</p>
<pre class="brush: plain">
Device Drivers -->
    USB support -->
        [M] Support for Host-side USB
        [M] USB Modem (CDC ACM) support
</pre>
<p>Check if the device is well reconized after install and modprobe the module(cdc_acm).</p>
<pre class="brush: plain">
# dmesg | grep acm
usbcore: registered new driver cdc_acm
drivers/usb/class/cdc-acm.c: v0.23:USB Abstract Control Model driver for USB modems and ISDN adapters
</pre>
<p>Great, the device has been recognized. Then create the ttyACM0 node in <em>/dev</em> is it does exist.<br />
<code><br />
mknod /dev/ttyACM0 c 166 0<br />
</code></p>
<p>Edit the configuration file <em>/etc/conf.d/net.ppp0</em> (or .ppp1, .ppp2). Here&#8217;s mine</p>
<pre class="brush: plain">
# Config file for /etc/init.d/net.ppp0

PEER="cdma"                     # Define peer (aka ISP)
DEBUG="yes"                     # Turn on debugging
PERSIST="no"                    # Redial after being dropped
ONDEMAND="no"                   # Only bring the interface up on demand?
MODEMPORT="/dev/ttyACM0"        # TTY device modem is connected to
LINESPEED="230400"              # Speed pppd should try to connect at
INITSTRING=""                   # Extra init string for the modem
DEFROUTE="yes"                  # Must pppd set the default route?
HARDFLOWCTL="yes"               # Use hardware flow control?
ESCAPECHARS="yes"               # Use escape caracters ?
PPPOPTIONS=""                   # Extra options for pppd
USERNAME="card"                 # The PAP/CHAP username
PASSWORD="card"                 # Your password/secret.  Ugly I know, but i
                                # will work on something more secure later
                                # on.  700 permission on /etc/init.d/net.ppp0
                                # should be enouth for now.
NUMBER="#777"                   # The telephone number of your ISP
                                # leave blank for leased-line operation.
REMIP=""                        # The ip of the remote box if it should be set
NETMASK=""                      # Netmask
IPADDR=""                       # Our IP if we have a static one
MRU="768"                       # Sets the MRU
MTU="768"                       # Sets the MTU
RETRYTIMEOUT="60"               # Retry timeout for when ONDEMAND="yes" or
                                # PERSIST="yes"
IDLETIMEOUT="600"               # Idle timeout for when ONDEMAND="yes"
PEERDNS="yes"                   # Should pppd set the peer dns?

AUTOCFGFILES="no"               # By default this scripts will generate
                                # /etc/ppp/chat-isp, /etc/ppp/chap-secrets,
                                # /etc/ppp/pap-secrets and /etc/ppp/peers/isp
                                # automatically.  Set to "no" if you experience
                                # problems, or need specialized scripts.  You
                                # will have to create these files by hand then.

AUTOCHATSCRIPT="no"             # By default this script iwll generate
                                # /etc/ppp/chat-${PEER} automatically. Set to "no"
                                # if you experience problems, or need specialized
                                # scripts. You will have to create these files by
                                # hand then.

# Directory where the templates is stored
TEMPLATEDIR=/etc/ppp
</pre>
<p>Then have to manual edit two additional files <em>/etc/ppp/chat-cdma</em> and <em>/etc/ppp/peers/cdma</em>.</p>
<pre class="brush: plain">
# /etc/ppp/chat-cdma:
'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO ANSWER'
'ABORT' 'NO CARRIER'
'ABORT' 'NO DIALTONE'
'ABORT' 'Invalid Login'
'ABORT' 'Login incorrect'
'' 'ATZ'
'OK' 'ATDT#777'
'CONNECT' ''
'TIMEOUT' '5'
'~--' ''
</pre>
<pre class="brush: plain">
# /etc/ppp/peers/cdma:
connect "/usr/sbin/chat -v -f /etc/ppp/chat-cdma"
defaultroute
usepeerdns
/dev/ttyACM0
230400
local
novj
</pre>
<p>Now everything is OK.  To dialup the Internet simply type<br />
<code><br />
/etc/init.d/net.ppp0 start<br />
</code></p>
<p>The CDMA ISP is <a href="http://www.chinaunicom.com.cn">China Unicom</a>.</p>
<p>If the above configurations does not fit for your situation <a href="http://www.google.com/search?hl=en&#038;lr=&#038;newwindow=1&#038;q=linux+usb+modem+cdma+dialup&#038;btnG=Search">try to search more information here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://erning.net/archives/gentoo-linux-dailup-internet-by-cdma-phone/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
