Linux系统通过手机GPRS无线上网

2020-01-30 11:10:51于丽
[Dialer defaults] Init1 = at+cgdcont=1,"ip","cmwap" Modem Type = USB Modem ISDN = 0 Phone = *99***1# Modem = /dev/ttyACM0 Username = any Carrier Check = no Password = any Baud = 460800

 

保存后,使用wvdial拨号

 

 


sudo wvdial

 

使用超级用户操作,不然无法会提示设备忙,或更改用户权限。

 

 


--> 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]} }<}!}$}%}"}&} } } } }#}$!}![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]

 

到如已经成功啦!我们再来看看路由表

 

 


$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.216.91.0 * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0