Establish GPRS wireless modem dial below LinLUX

xiaoxiao2021-03-06  21

Here, we use the product of Xiamen Lands Communications Co., Ltd .: Www.xmlenz.cn:

1. Connect the wireless MODEM to the serial port 1 (/ dev / ttys0) of the PC.

2. First use Minicom (strongly recommended to create a new Terminal under Linux graphics user interface, then run minicom), set the rate to 57600, 8n1, Hardware Flow Control.

3. Run AT to see if it will return OK. If there is no return, it indicates that the serial port is set, or the serial speed setting of Lenz Modem is set;

4. Enter the AT CSQ? How to see the signal quality, if the result is similar CSQ: 22,99 (the number before comma is between 12 ~ 31) is normal.

5. Enter AT CGDCont = 1, "IP", "cmnet" to see if it will return OK. The role of this command is to set the APN (access access point name). If your APN is other value, replace the CMNET accordingly. For example, assume that your APN is gdyd.yl, enter AT CGDCONT = 1, "IP", "GDYD.YL";

6. Enter the ATDT * 99 *** 1 # See if you will return Connect. Under normal circumstances should return Connect, and some data should appear later;

7. Exit Minicom software.

8. Run wvdialconf /etc/wvdial.conf. It can be seen that the system automatically starts to find MODEM, and will successfully find MODEM installed on TTYS0, and the rate is 57600, as shown below:

[root @ Test PPP] # wvdialconf /etc/wvdial.conf

Scanning your serial ports for a modem.

TTYS0 <* 1>: ATQ0 V1 E1 - Failed with 2400 Baud, Next: 4800 Baud

TTYS0 <* 1>: ATQ0 V1 E1 - Failed with 4800 Baud, Next: 9600 Baud

TTYS0 <* 1>: ATQ0 V1 E1 - Failed with 9600 Baud, Next Try: 19200 Baud

TTYS0 <* 1>: ATQ0 V1 E1 - Failed with 19200 Baud, Next: 57600 Baud

TTYS0 <* 1>: ATQ0 V1 E1 - OK

TTYS0 <* 1>: ATQ0 V1 E1 Z - OK

TTYS0 <* 1>: ATQ0 V1 E1 S0 = 0 - OK

TTYS0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 - OK

TTYS0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 & D2 - OK

TTYS0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 & D2 FCLASS = 0 - OK

TTYS0 <* 1>: Modem Identifier: ATI - SIEMENS MC35 GPRS MODEM

TTYS0 <* 1>: max speed is 57600; That Should Be Safe.

TTYS0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 & D2 FCLASS = 0 - OK

Found 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 results are different from above, please try a few times, the system will successfully find MODEM.

9. vi /etc/wvdial.conf, modify this file as follows:

[Dialer Defaults]

Modem = / dev / ttys0

Baud = 57600

INIT1 = ATZ

INIT2 = ATQ0 V1 E1 S0 = 0 & C1 & D2 FCLASS = 0

ISDN = 0

Modem type = analog modem

Phone = * 99 *** 1 #

Username =

PASSWORD =

10. Edit / etc / chap-secrets and / etc / pap-secrets

Change the content in both files to

"*" "

Note that the first pair of quotes are user names, and the * is indicated that the server name is not limited, and the second pair of quotes are the check password.

11. Run wvdial, you can see the results as follows:

[root @ Test PPP] # wvdial

-> WVDIAL: Internet Dialer Version 1.53

-> Initializing Modem.

-> Sending: ATZ

ATZ

OK

-> Sending: ATQ0 V1 E1 S0 = 0 & C1 & D2 FCLASS = 0

OK

-> Modem Initialized.

-> sending: atdt * 99 *** 1 #

-> Waiting for carrier.

ATDT * 99 *** 1 #

Connect

-> Carrier Detected. Waiting for Prompt.

~ [

7F]} # @!}!}!}}}}} #}}}}}} #}% B #}%}%} & i =} 3 [18]} (} "} ^} # ~

-> PPP Negotiation detected.

-> Starting Pppd At Thu May 13 17:47:11 2004

-> pid of pppd: 19535

12. Open another Terminal, run ifconfig, you can see that PPP0 devices have appeared in the interface, as shown below:

PPP0 LINK ENCAP: Point-to-Point Protocol

INET AddR: 220.192.68.149 P-T-P: 220.192.64.1 Mask: 255.255.255.255

Up Pointopoint Running Noarp Multicast MTU: 1500 Metric: 1

RX Packets: 3 Errors: 0 Dropped: 0 overruns: 0 frame: 0

TX Packets: 4 Errors: 0 Dropped: 0 overruns: 0 Carrier: 0

Collisions: 0 TXQuelelen: 3

Rx bytes: 66 (66.0 b) TX bytes: 84 (84.0 b)

You can see the dynamic address 220.192.68.149

13. At this time, you need to add a default route: Route add default ppp0, after adding, you can try a real Internet after the addition is complete, for example, in public online can ping 166.111.8.238, should pass; 14 If you want to hang up the PPP join, it is simple, just switch to the Terminal where Wvdial is located, then press Ctrl C, you can also drop the wvdial process to Kill, 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

转载请注明原文地址:https://www.9cbs.com/read-43669.html

New Post(0)