<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 手機(jī)與無線通信 > 學(xué)習(xí)方法與實(shí)踐 > Linux系統(tǒng)如何通過手機(jī)GPRS功能無線上網(wǎng)

          Linux系統(tǒng)如何通過手機(jī)GPRS功能無線上網(wǎng)

          作者:korn 時間:2008-01-29 來源:賽迪網(wǎng) 收藏


          本文引用地址:http://www.ex-cimer.com/article/78201.htm

                首先,要有一臺具備GPRS且?guī)в衜odem功能的手機(jī),以下以palm treo 650為例。

                 650是不帶modem功能,要通過軟件實(shí)現(xiàn),下載 USB modem軟件并安裝在650上。該軟件支持藍(lán)牙和usb數(shù)據(jù)線兩種模式!

                 下面首先看系統(tǒng)是否能檢測到modem


          sudo wvdialconf



          Editing `/etc/wvdial.conf'.
                      Scanning your serial ports for a modem.
                      Modem Port Scan<*1>: S0 S1 S2 S3
                      WvModem<*1>: Cannot get information for serial port.
                      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 -- ENZO
                      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.
                      Modem configuration written to /etc/wvdial.conf.
                      ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"


                如果出現(xiàn)以下信息則能檢測modem且將配置自動寫入 /etc/wvdial.conf文件。你modem的設(shè)備文件為/dev/ttyACM0

                由于配置文件為普通撥號而建立,所以不適合grps撥號,要作以下修改


          [Dialer defaults]
                      Init1 = at+cgdcont=1,"ip","cmwap"
                      Modem Type = USB Modem
                      ISDN = 0
                      Phone = *99***1#
                      Modem = /dev/ttyACM0
                      Username = any
                      Carrier Check = no
                      Password = any
                      Baud = 460800


                 保存后,使用wvdial撥號


          sudo wvdial

                 使用超級用戶操作,不然無法會提示設(shè)備忙,或更改用戶權(quán)限。



          --> WvDial: Internet dialer version 1.60
                      --> Cannot get information for serial port.
                      --> Initializing modem.
                      --> Sending: at+cgdcont=1,"ip","cmwap"
                      at+cgdcont=1,"ip","cmwap"
                      OK
                      --> Modem initialized.
                      --> Sending: ATDT*99***1#
                      --> Waiting for carrier.
                      ATDT*99***1#
                      CONNECT
                      ~[7f]}#@!}![06]} }<}!}$}%}"}&} } } } }#}$@#}%}&}$^[7f]o}'}"}(}"Q}+~
                      --> Carrier detected. Waiting for prompt.
                      ~[7f]}#@!}![06]} }<}!}$}%}"}&} } } } }#}$@#}%}&}$^[7f]o}'}"}(}"Q}+~
                      --> PPP negotiation detected.
                      --> Starting pppd at Sat Jan 19 10:56:20 2008
                      --> Pid of pppd: 6967
                      --> Using interface ppp0
                      --> pppd: (m[07][08]hr[07][08]
                      --> pppd: (m[07][08]hr[07][08]
                      --> pppd: (m[07][08]hr[07][08]
                      --> pppd: (m[07][08]hr[07][08]
                      --> pppd: (m[07][08]hr[07][08]
                      --> local IP address 10.216.91.90
                      --> pppd: (m[07][08]hr[07][08]
                      --> remote IP address 10.216.91.0
                      --> pppd: (m[07][08]hr[07][08]

               到如已經(jīng)成功啦!我們再來看看路由表



          $ route
                      Kernel IP routing table
                      Destination Gateway Genmask Flags Metric Ref Use Iface
                      10.216.91.0 * 255.255.255.255 UH 0 0 0 ppp0
                      192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
                      default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0

                  因?yàn)槲疫@里還連接到無線網(wǎng)絡(luò),所以默認(rèn)網(wǎng)關(guān)是 192.168.0.1,如果只有GPRS撥號連接,則信息會是:



          $ route
                      Kernel IP routing table
                      Destination Gateway Genmask Flags Metric Ref Use Iface
                      10.216.91.0 * 255.255.255.255 UH 0 0 0 ppp0
                      default 10.216.91.90 0.0.0.0 UG 0 0 0 ppp0

                此時,只需設(shè)置代理即可以上網(wǎng)了 代理為 10.0.0.172:80


                由于移動限制了瀏覽器,必須要將瀏覽器頭信息更改才能正常上網(wǎng)。不過已經(jīng)可以上Q。MSN等聊天工具啦!!

          linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)

          linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)


          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();