Ubuntu 8.04搞定CDMA上网


继下午搞定局域网连接打印机之后,刚才顺利搞定了CDMA PCMCIA卡拨号上网,大致的情况汇报如下。

#sudo apt-get install setserial pcmciautils (安装两个工具)
#sudo pccartctl info (还可以用status, eject, ls 等子命令,具体的看man)
#dmesg |grep tty (得到类似下面的东西)
[   34.574046] 0.0: ttyS0 at I/O 0x3f8 (irq = 3) is a 16C950/954
可以得知 ttyS0 就是cdma卡设备,继续后面的操作

#sudo vim /etc/wvdial.conf 输入下面的内容
Modem = /dev/ttyS0
Baud = 57600
SetVolume = 1
Dial Command = ATDT
Init1 = ATZ
FlowControl = Hardware (CRTSCTS)

[Dialer Defaults]
Phone = #777
Username = card
Password = card
Stupid Mode = 1
Inherits = Modem0

#sudo vim /var/lib/setserial/autoserial.conf (输入下面的内容)
/dev/ttyS0 uart 16950/954 port 0x03f8 irq 3 baud_base 230400 spd_normal skip_test

#sudo setserial /dev/ttyS0 baud_base 230400 (这个东西有些专业,需要咨询相关人士)

#sudo wvdial

--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Aug  6 03:04:20 2008
--> Pid of pppd: 7610
--> Using interface ppp0
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> local  IP address
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> remote IP address
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> primary   DNS address
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> secondary DNS address
--> pppd: ��[06][08]��[06][08][18]�[06][08]

窗口不要关闭,否则就断线了,如果主动想断线,可以按 CTRL + C ,会看到下面的内容输出:

Caught signal 2:  Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> Connect time 0.4 minutes.
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> pppd: ��[06][08]��[06][08][18]�[06][08]
--> Disconnecting at Wed Aug  6 03:04:41 2008

在连接上网后,可以使用 ifconfig -a 看看网络连接情况,应该能看到 ppp0 网络设备的参数。

#netstat -rn (查看当前路由表,或者命令 route 也可以)
#route add default ppp0 (添加默认的路由)

此时应该全部成功了,希望你也能和我一样幸运! 🙂

注: 我的CDMA卡是PANDA的牌子,很普通的一个国产便宜货,通过 pccardctl info 命令可以看到如下信息:
#pccardctl info

Category: Linux / BSD  Tags: ,
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
4 Responses
  1. 李海鑫 says:


  2. Michael says:

    [Comment ID #29929 Will Be Quoted Here]

    不是乱码, 那个就是看到的原来的东西。

  3. kevin says:


  4. Michael says:

    [Comment ID #29936 Will Be Quoted Here]

    哈哈,其实没啥技术含量 🙁

  5. ps4 games says:

    Thank you, I have recently been looking for information approximately this subject for a
    while and yours is the best I’ve came upon so far.

    However, what concerning the bottom line? Are you sure
    concerning the source?

  6. ps4 games says:

    Great blog here! Also your website loads up fast!
    What host are you using? Can I get your affiliate link to your
    host? I wish my site loaded up as fast as yours lol

  7. I delight in, cause I discovered exactly what I
    was taking a look for. You have ended my four day long hunt!

    God Bless you man. Have a great day. Bye

  8. ps4 games says:

    Nice post. I learn something totally new and challenging on blogs I stumbleupon on a daily basis.

    It’s always exciting to read articles from other writers and use something from other web sites.

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image