In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to set up GPRS wireless MODEM dialing under linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Connect the wireless Modem to serial port 1 (/ dev/ttyS0) of the PC.
two。 First use minicom (it is strongly recommended to create a new Terminal under the graphical user interface of linux, and then run minicom), and set the speed to 57600, 8N1 hardware Flow Control.
3. Run AT to see if OK is returned. If it is not returned, there is a problem with the serial port setting, or there is a problem with the serial port rate setting of Saro Modem.
4. Enter AT+CSQ? Depending on the quality of the signal, if the result is similar to + CSQ: 222299 (the number before the comma is between 12 and 31), it is normal.
5. Enter AT+CGDCONT=1, "IP", "cmnet" to see if OK is returned. The purpose of this command is to set the Apn (access access call). If your Apn is a different value, replace the cmnet accordingly. For example, if your Apn is gdyd.yl, enter AT+CGDCONT=1, "IP", "gdyd.yl"
6. Enter ATDT*99***1# to see if CONNECT is returned. 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 looking for modem and will successfully find Modem and install it on ttyS0 at a rate of 57600, as shown below:
[root@test ppp] # wvdialconf / etc/wvdial.conf
Scanning your serial ports for a modem.
TtyS0: ATQ0 V1 E1-failed with 2400 baud, next try: 4800 baud
TtyS0: ATQ0 V1 E1-failed with 4800 baud, next try: 9600 baud
TtyS0: ATQ0 V1 E1-failed with 9600 baud, next try: 19200 baud
TtyS0: ATQ0 V1 E1-failed with 19200 baud, next try: 57600 baud
TtyS0: ATQ0 V1 E1-OK
TtyS0: ATQ0 V1 E1 Z-OK
TtyS0: ATQ0 V1 E1 S0500-OK
TtyS0: ATQ0 V1 E1 S0500 & C1-- OK
TtyS0: ATQ0 V1 E1 S0 & C1 & D2-- OK
TtyS0: ATQ0 V1 E1 S0 & C1 & D2 + FCLASS=0-- OK
TtyS0: Modem Identifier: ATI-Siemens Mc35 Gprs Modem
TtyS0: Max speed is 57600; that should be safe.
TtyS0: ATQ0 V1 E1 S0 & 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 & C1 & D2 + FCLASS=0"
If the result is different from the above, please try a few more times, and the system will eventually find Modem successfully.
9.vi / etc/wvdial.conf, modify this file as follows:
[Dialer Defaults]
Modem = / dev/ttyS0
Baud = 57600
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0UB0 & C1 & D2 + FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = * 99 million dollars
Username =
Password =
10. Edit / etc/chap-secrets and / etc/pap-secrets
Change the contents of both files to
"" * "
Note that the first pair of quotation marks is the user name, the * sign indicates that there is no restriction on the server name, and the second pair is enclosed in quotation marks for the check password.
11. Run wvdial, and 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 S0UB0 & C1 & D2 + FCLASS=0
OK
-> 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: 19535
twelve。 Open another Terminal and run ifconfig to see that the ppp0 device has already 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 txqueuelen:3
RX bytes:66 (66.0b) TX bytes:84 (84.0b)
You can see that the dynamic address 220.192.68.149 has been obtained.
13. At this time, you need to manually add a default route: route add default ppp0. After adding the default route, you can try to see if you really surf the Internet by using an address at the remote end of ping. For example, if you can ping 166.111.8.238 on the public network, it should be connected.
14. If you want to hang up the ppp connection, simply switch to the Terminal where the wvdial is located, and then press Ctrl + C, or you can drop the wvdial process for 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
This is the end of the introduction of "how to set up GPRS wireless MODEM dialing under linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 220
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.