学习网考试学习资料

Gzu521.com

在 Linux 下使用 CDMA 1x USB 无线上网

LINUX教程   点击:次   发布时间:2007-2-25   【字体: 】   来源:blog
贵州学习网—属于你的学习中心
测试环境: LINUX 2.6.16-gentoo-r2 x86_64 amd athlon(tm) 64 processor 3400+ gnu/linux
硬件设备: 波乐 5188 usb cdma 1x moderm, 联通新时空卡
需要软件: ppp wvdial
安装过程:

  1. 安装软件
    代码:

    emerge ppp wvdial

  2. 修改用户组
    代码:

    usermod -ag dialout 用户名

  3. 运行配置生成文件
    代码:

    wvdialconf /etc/wvdial.conf
    editing `/etc/wvdial.conf’.
    scanning your serial ports for a modem.
    ttys0<*1>: atq0 v1 e1 -- failed with 2400 baud, next try: 9600 baud
     ttys0<*1>: atq0 v1 e1 -- failed with 9600 baud, next try: 115200 baud
     ttys0<*1>: atq0 v1 e1 -- and failed too at 115200, giving up.
     ttys1<*1>: atq0 v1 e1 -- failed with 2400 baud, next try: 9600 baud
     ttys1<*1>: atq0 v1 e1 -- failed with 9600 baud, next try: 115200 baud
     ttys1<*1>: atq0 v1 e1 -- and failed too at 115200, giving up.
     modem port scan<*1>: s2 s3
     ttyacm0<*1>: atq0 v1 e1 -- ok
     ttyacm0<*1>: atq0 v1 e1 z -- ok
     ttyacm0<*1>: atq0 v1 e1 s0=0 -- ok
     ttyacm0<*1>: atq0 v1 e1 s0=0 &c1 -- ok
     ttyacm0<*1>: atq0 v1 e1 s0=0 &c1 &d2 -- ok
     ttyacm0<*1>: atq0 v1 e1 s0=0 &c1 &d2 +fclass=0 -- ok
     ttyacm0<*1>: modem identifier: ati -- error
     ttyacm0<*1>: speed 4800: at -- ok
     ttyacm0<*1>: speed 9600: at -- ok
     ttyacm0<*1>: speed 19200: at -- ok
     ttyacm0<*1>: speed 38400: at -- ok
     ttyacm0<*1>: speed 57600: at -- ok
     ttyacm0<*1>: speed 115200: at -- ok
     ttyacm0<*1>: speed 230400: at -- ok
     ttyacm0<*1>: speed 460800: at -- ok
     ttyacm0<*1>: max speed is 460800; that should be safe.
     ttyacm0<*1>: atq0 v1 e1 s0=0 &c1 &d2 +fclass=0 -- ok
    found an usb modem on /dev/ttyacm0.
     /etc/wvdial.conf: can’t open ’/etc/wvdial.conf’ for reading: no such file or directory
     /etc/wvdial.conf: ...starting with blank configuration.
     modem configuration written to /etc/wvdial.conf.
     ttyacm0: speed 460800; init "atq0 v1 e1 s0=0 &c1 &d2 +fclass=0"
     

  4. 修改配置文件 nano -w /etc/wvdial.conf
    代码:

     [dialer defaults]
     init2 = atq0 v1 e1 s0=0 &c1 &d2 +fclass=0
     modem type = usb modem
     phone = #777
     isdn = 0
     username = card
     init1 = atz
     password = card
     modem = /dev/ttyacm0
     baud = 460800
     


使用说明:


  • 运行
    代码:

     modprob ppp
     wvdial
     

  • 看到的结果如下:
    代码:

     --> wvdial: internet dialer version 1.56
     --> cannot open /dev/ttyacm0: input/output error
     --> initializing modem.
     --> sending: atz
     atz
     ok
     --> sending: atq0 v1 e1 s0=0 &c1 &d2 +fclass=0
     atq0 v1 e1 s0=0 &c1 &d2 +fclass=0
     ok
     --> modem initialized.
     --> sending: atdt#777
     --> waiting for carrier.
     atdt#777
     connect
     --> carrier detected. waiting for prompt.
     ~[7f]}#@!}!}!} }=}!}$}%j}"}&} } } } }#}%b#}%}%}&} oob}’}"}(}"hn~
     --> ppp negotiation detected.
     --> starting pppd at fri apr 21 17:34:53 2006
     --> pid of pppd: 11116
     --> using interface ppp0
     --> pppd: 5+
     --> pppd: 5+
     --> pppd: 5+
     --> pppd: 5+
     --> local ip address 220.205.12.112
     --> pppd: 5+
     --> remote ip address 220.192.8.6
     --> pppd: 5+
     --> primary dns address 220.192.8.58
     --> pppd: 5+
     --> secondary dns address 220.192.32.103
     --> pppd: 5+
     

责任编辑:gzu521

电脑课堂分类
Windows 2000教程
Windows XP教程
Windows 2003教程
Windows Vista教程
LINUX教程
软件教学
办公软件
硬件DIY
分类推荐信息
更多...
大类最新文章
更多...