Establishing GPRS wireless Modem dialing method under Linux system

  
                  1. Connect the wireless modem to the serial port 1 (/dev/ttyS0) of the PC. 2. First use minicom (highly recommended to create a new terminal in the graphical user interface of Linux, then run minicom), set the rate to 57600, 8N1, Hardware Flow Control. 3. Run AT to see if it will return OK. If it does not return, it indicates that there is a problem with the serial port setting, or there is a problem with the serial port speed setting of Saro Modem. 4. Enter AT+CSQ? See the signal quality. If the result is similar to +CSQ: 22,99 (the number before the comma is 12~31) Between) is normal. 5. Enter AT+CGDCONT=1, “IP”, “cmnet” to see if it will return OK. The purpose of this command is to set the Apn (access access point name). If your Apn is another value, please replace cmnet accordingly. For example, if your Apn is gdyd.yl, please enter AT+CGDCONT=1, "IP", "gdyd.yl"; 6. Enter ATDT*99***1# to see if it will return CONNECT. Normally, CONNECT should be returned, and some data should appear later; 7. Exit the minicom software. 8. Run wvdialconf /etc/wvdial.conf. You can see that the system automatically starts to find the modem, and will successfully find the Modem installed on ttyS0, and the rate is 57600, as shown below:
[root@test ppp]# wvdialconf /etc/wvdial.confScanning your serial ports for a modem.ttyS0<*1>: ATQ0 V1 E1 -- ​​failed with 2400 baud, next try: 4800 baudttyS0<*1>: ATQ0 V1 E1 -- ​​failed with 4800 baud, next try: 9600 baudttyS0<*1>: ATQ0 V1 E1 -- ​​failed with 9600 baud, next try: 19200 baudttyS0<*1>: ATQ0 V1 E1 -- ​​failed with 19200 baud, next try: 57600 baudttyS0<*1>: ATQ0 V1 E1 -- ​​OKttyS0<*1>: ATQ0 V1 E1 Z -- OKttyS0<*1>: ATQ0 V1 E1 S0=0 -- OKttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OKttyS0<*1>: ATQ0 V1 E1 S0=0 & C1 &D2 -- OKttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OKttyS0<*1>: Modem Identifier: ATI – Siemens Mc35 Gprs ModemttyS0<*1>: Max speed is 57600; that should be safe.ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OKFound a modem on /dev/ttyS0.Modem Configuration written to /etc/wvdial.conf.ttyS0: Speed ​​57600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" If the result is different from the above, please try again, the system will always be Successfully found the modem 
9.vi /etc/wvdial.conf, modify this file as follows:
[Dialer Defaults]Modem = /dev/ttyS0Baud = 57600Init1 = ATZInit2 = ATQ0 V1 E1 S0=0 & C1 &D2 +FCLASS=0ISDN = 0Modem Type = Analog ModemPhone = *99***1#Username = Password =10. Edit /etc/chap-secrets and /etc/pap-secrets to put the contents of both files Change to "" * "" Note that the first pair of quotes is the user name, the * sign indicates no restrictions on the server name, and the second pair of quotes is the check password. 11. Run wvdial and you can see the result as follows: 
[root@test ppp]# wvdial--> WvDial: Internet dialer version 1.53--> Initializing modem.--> Sending: ATZATZOK--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0OK--> Modem initialized.--> Sending: ATDT*99***1#--> Waiting for carrier.ATDT*99 ***1#CONNECT--> Carrier detected. Waiting for prompt.~[7f]}#@!}!}!} }7}"}&} } } } }#}%B#}%}% }&I=}3[18]}(}"}^}#~--> PPP negotiation detected.--> Starting pppd at Thu May 13 17:47:11 2004--> pid of pppd : 1953512. Open another terminal, run ifconfig to see that the ppp0 device has appeared in the interface, as shown below: 
ppp0 Link encap: Point-to-Point Protocolinet addr: 220.192.68.149 PtP: 220.192.64.1 Mask :255.255.255.255UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1RX packets:3 errors:0 dropped:0 overruns:0 frame:0TX packets:4 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:3RX Bytes:66 (66.0 b) TX bytes:84 (84.0 b) can see already Got the dynamic address 220.192.68.149 13. At this time you need to manually add a default route: route add default ppp0, after the completion of the addition can ping the remote address to try whether it is really online, for example, on the public network can ping 166.111.8.238 It should pass; 14. If you want to hang up the ppp connection, it is very simple, just switch to the terminal where wvdial is located, then press Ctrl + C, you can also kill the wvdial process, the result is as follows: 
Caught signal # 2! Attempting to exit gracefully...--> Disconnecting at Thu JULY 13 17:58:26 2004[root@test ppp]# ppp0 Link encap:Point-to-Point Protocol
Copyright © Windows knowledge All Rights Reserved