Wireless Internet access through mobile GPRS in Linux

Source: Internet
Author: User
Article title: Linux wireless Internet access via mobile GPRS function. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open source and other basic categories, first of all, there must be a mobile phone with GPRS and modem function, the following uses palm treo 650 as an example.
 
650 does not contain the modem function. you need to use the software to download the USB modem software and install it on 650. The software supports two modes: Bluetooth and usb data cable!
 
The following describes whether the system can detect the 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 -- OKttyACM0<*1>: ATQ0 V1 E1 Z -- OKttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OKttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OKttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OKttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OKttyACM0<*1>: Modem Identifier: ATI -- ENZOttyACM0<*1>: Speed 4800: AT -- OKttyACM0<*1>: Speed 9600: AT -- OKttyACM0<*1>: Speed 19200: AT -- OKttyACM0<*1>: Speed 38400: AT -- OKttyACM0<*1>: Speed 57600: AT -- OKttyACM0<*1>: Speed 115200: AT -- OKttyACM0<*1>: Speed 230400: AT -- OKttyACM0<*1>: Speed 460800: AT -- OKttyACM0<*1>: Max speed is 460800; that should be safe.ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OKFound 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"
     


 
If the following information is displayed, the modem can be detected and the configuration is automatically written to the/etc/wvdial. conf file. The device file of your modem is/dev/ttyACM0.
 
Since the configuration file is created for normal dialing, grps dialing is not suitable. modify the following:
 
  

     
      [Dialer defaults]Init1 = at+cgdcont=1,"ip","cmwap"Modem Type = USB ModemISDN = 0Phone = *99***1#Modem = /dev/ttyACM0Username = anyCarrier Check = noPassword = anyBaud = 460800
     
 
After saving, use wvdial to dial
 
  
     
      sudo wvdial
     

 
If you are using a superuser, you cannot prompt that the device is busy or change the user permission.
 
  
     
      --> 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]
     

 
If it is successful! Let's take a look at the Route table.
 
  
     
      $ routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface10.216.91.0 * 255.255.255.255 UH 0 0 0 ppp0192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
     
 
Because I am still connected to a wireless network, the default gateway is 192.168.0.1. if there is only a GPRS dial-up connection, the information will be:
 
  
     
      $ routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface10.216.91.0 * 255.255.255.255 UH 0 0 0 ppp0default 10.216.91.90 0.0.0.0 UG 0 0 0 ppp0
     

 
In this case, you only need to set the proxy to access the internet. the proxy is 10.0.0.172: 80.
 
Because mobile browsers are restricted, you must change the browser header information to access the internet normally. However, you can use Q. MSN and other chat tools !!
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.