Ubuntu: 3G 网卡配置(中兴)

ubuntu 3 G 网卡配置颇为费劲,根据步骤1配置完成后,有时候能连,有时候连接不成功,后来请教同事后才得以解决,这里仅分享解决方法,不保证对其它类型网卡有效。

步骤一:配置无线网络

配置无线网络,如下图:

Ubuntu: 3G 网卡配置(中兴)
Ubuntu: 3G 网卡配置(中兴)
Ubuntu: 3G 网卡配置(中兴)

备注:根据网上的资料,配置完以上后,发现有时能上网,有时上不了,原因是每次无线网卡的 /dev/ttyUSB 口是不一样的, 而这里没有图形化界面配置,这里可以安装 wvdial 工具,在配置文件中指定 /dev/ttyUSB 口。

步骤二:安装配置 Wvdial

2.1 安装 wvdial

1
sudo apt-get install wvdial

2.2 修改配置文件 
修改配置文件,/etc/wvdial.conf,如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[Dialer cdma3g]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = ATE0V1
Init5 = ATS0=0
#Init6 = AT+CGDCONT=1,"IP","uninet"
Init7 = AT+CFUN=1
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = #777
Modem = /dev/ttyUSB0
Password = vnet.mobi
Username = ctnet@mycdma.cn
Baud = 4608000
[Dialer cdma1x]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = #777
Modem = /dev/ttyUSB0
Username = CARD
Password = CARD
Baud = 460800
[Dialer shh]
Init3 = ATM0
[Dialer Defaults]
Init1 = ATZ
Stupid Mode = on
Dial Attempts = 1
Password = vnet.mobi
Ask Password = off
Check Def Route = on
Phone = #777
Idle Seconds = 0
Abort on Busy = off
Abort on No Dialtone = on
Modem Type = Analog Modem
Baud = 9600
Auto DNS = on
Dial Command = ATM1L3DT
Modem = /dev/ttyUSB0
Init = ATX0
ISDN = 0
Username = ctnet@mycdma.cn
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Carrier Check = no
Auto Reconnect = on
--2.3 连接测试
francs@francs:~$ sudo wvdial
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATX0
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATM1L3DT#777
--> Waiting for carrier.
ATM1L3DT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon Dec 23 18:20:19 2013
--> Pid of pppd: 12177
--> Using interface ppp0
--> pppd: [17][7f]
--> pppd: [17][7f]
--> pppd: [17][7f]
--> pppd: [17][7f]
--> local IP address 10.164.207.205
--> pppd: [17][7f]
--> remote IP address 115.168.75.196
--> pppd: [17][7f]
--> primary DNS address 202.101.172.37
--> pppd: [17][7f]
--> secondary DNS address 202.101.173.157
--> pppd: [17][7f]

备注:如果这步不通,则可以尝试修改 /etc/wvdial.conf 中的 ttyUSB 其它口测试下,在高手苏茶林同学的帮助下,终于搞定了 3G 网卡,这里感谢下。

参考

原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/238030.html

(0)
上一篇 2022年1月30日
下一篇 2022年1月30日

相关推荐

发表回复

登录后才能评论