请教如何在9.04中设置联通GPRS

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
lxydlpding
帖子: 12
注册时间: 2009-02-04 19:25

请教如何在9.04中设置联通GPRS

#1

帖子 lxydlpding » 2009-05-16 20:46

我的上网方式是 笔记本连手机拨号上网:

手机如果用移动的卡拨号上网,QQ能上,网页也能打开;但是在换成联通的卡后能拨号成功,却无法上网页,也无法上QQ,请问是为什么?

所有的设置我都试过:设置代理10.0.0.172:80,或是不设置,都不能上,那位高人指点迷津,谢谢!!!!!!
上次由 lxydlpding 在 2009-05-17 20:05,总共编辑 1 次。
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: gprs如何拨号上网在ubuntu9.04中

#2

帖子 xiaoyong » 2009-05-16 23:21

标题建议改为“请教如何在9.04中设置联通GPRS”。

lz的APN用的是uninet还是uniwap? 9.04下proxy应该是不需要设的,只设定APN就可以了,用户名和密码也不需要。

建议试试移动的APN——cmnet,联通的卡应该也可以用的。也请说明测试后的结果。
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: gprs如何拨号上网在ubuntu9.04中

#3

帖子 xiaoyong » 2009-05-16 23:27

lxydlpding
帖子: 12
注册时间: 2009-02-04 19:25

Re: 请教如何在9.04中设置联通GPRS

#4

帖子 lxydlpding » 2009-05-17 20:09

谢谢您的答复,我试一下,再答复。

我的联通卡两个接口都能上,uninet和uniwap,我只是试用了uninet,另一个没试

我想肯定是在设置上有问题,我研究你给我的连接后再说
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: gprs如何拨号上网在ubuntu9.04中

#5

帖子 xiaoyong » 2009-05-17 20:53

xiaoyong 写了:
建议试试移动的APN——cmnet,联通的卡应该也可以用的。
因为联通和移动实际是一个代理服务器,10.0.0.172:80/9201,有资料说是联通租用的移动的网络(应该是服务器吧),APN因而是可以混用的。

9.04下,连接gprs设备,网络管理器应该能自动识别出来并弹出配置窗口,只须把设定APN就可以了,不需要用户名和密码。我的理解,如果移动的sim卡能用的话,把APN由 cmnet 改成 uninet 应该就可以了,甚至不改应该也可以用的——按照以上的分析。

你也可以尝试UMTSmon,最靠谱的方法是编写ppp拨号脚本,在命令行下拨号,百试不爽。

参见我另外一篇帖子,viewtopic.php?f=116&t=204426&start=0
lxydlpding
帖子: 12
注册时间: 2009-02-04 19:25

Re: 请教如何在9.04中设置联通GPRS

#6

帖子 lxydlpding » 2009-05-18 3:20

请把脚本发给我好吗,我的设置都乱了,忘了备份,改不回来了,其它设置都没有不行,也许是我太笨了。

我想起来了,好像是刚刚用上联通卡时还上能上网页的,但是得设置代理,QQ设不设代理都上不去,但是后来网页也上不去了,现在依然!!

我继续努力!!

谢谢关注 to xiaoyong

我的QQ是 115081594
邮箱是 lxydlpding@sohu.com
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#7

帖子 xiaoyong » 2009-05-18 9:43

lxydlpding 写了:请把脚本发给我好吗,我的设置都乱了,忘了备份,改不回来了,其它设置都没有不行,也许是我太笨了。
哈哈,是我的用词不准确,把你吓着了,其实不是编写脚本,而是copy网上的拨号脚本( /etc/ppp/peers/和/etc/chatscripts/两个名称相同但内容不同的文件)——虽然是老外的,但把有关的配置改一下就可以了,主要是APN,印度ubuntu论坛的那个帖子其实总结的非常好,很清晰,我在下面贴一下,http://ubuntu-in.info/wiki/index.php/GP ... _Plug2Surf
Tata Indicom Plug2Surf

Technically Plug2surf (http://www.tataindicom.com/personal-int ... 2surf.aspx) is not GPRS. It is CDMA2000-1x connection. Thanks Hobbes for correction. :-) (NOTE: Connection settings are based on the information provided in document available in Windows dialer installation.)
Peers file

* Create a peers file for the connection

$ sudo vi /etc/ppp/peers/tatagprs

* Paste the following into the file (the file should start out blank)

noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/tatagprs"
debug
/dev/ttyACM0
460800
defaultroute
noipdefault
user "internet"
password "internet"
remotename tata
ipparam tata

usepeerdns

* Save and close the file.

Chatscript

* Create a chatscript for the connection

$ sudo vi /etc/chatscripts/tatagprs

* Paste the following into the file (the file should start out blank).

ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'ERROR'
'' ATZ
OK ATDT#777
CONNECT ''

* Save and close the file.
这里是印度Tata电信CDMA,但只要把拨号号码从#777改成*99#就可以了,然后在用户组管理中赋予当前用户从modem拨号联网的权限,命令行下pon 和 poff 就可以了(pon和poff后是你自建的连接名称,就是上面提到的那两个名称相同内容不同的文件)
上次由 xiaoyong 在 2009-05-18 10:30,总共编辑 1 次。
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#8

帖子 xiaoyong » 2009-05-18 10:15

再贴一篇,英国3公司的配置,但我们改一下就能用,http://weirdo.bur.st/2007/05/10/linux-3 ... lin-xu870/
Create the following files

/etc/ppp/peers/3

connect "/usr/sbin/chat -v -f /etc/chatscripts/3"
usepeerdns
defaultroute
/dev/ttyUSB0
230400
user "a"

You'll notice that username and password don't matter, but I believe you need something in there. Also, you may have default route problems, for example if you normally have a wired gateway, if that is the case, disable the network interfaces before starting up the wireless, then bring them up after.

/etc/chatscripts/3

TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
"" "ATZ"
"" "AT&FH0L3"
"" 'at+cgdcont=1,"IP","3netaccess","",0,0'
OK-AT-OK "ATDP*99#"
TIMEOUT 75
CONNECT

You'll notice this is almost the default script created by the Gnome Network Manager. That is because it basically is! The last TIMEOUT you can probably change to 5 or something, because this "dialup" connection is almost instantaneous! The important bit is the line with 3netacccess in it, and of course the dialing line. The number to dial is *99# and 3netaccess is the "APN" or Access Point you are going through. 3service (or 3services, can't remember) will give you proper access to Planet3 for example. So if you are putting a normal 3 SIM in your netcard, e.g. you mates prepaid service, you can access what ever they can normally access, by using 3service instead of 3netaccess.

After doing all that, you should be read to connect. A simple "pon 3″ command will start pppd and connect to 3. Watch the light on your card, as well as your syslogs. If the light stops flashing, and goes solid yellow or blue, then your connected. Check your logs that pppd got a DNS server, and ip address.

The "poff" command should disconnect it.
这里新建的两个文件名称是可以随便取的,用原帖的也可以,但你如果是自建的文件名称cmnet、uninet,/etc/ppp/peers/文件第一行最后的文件名

代码: 全选

connect "/usr/sbin/chat -v -f /etc/chatscripts/3"
要用自建的文件名称代替。上面贴出的/etc/chatscripts/3内的"IP","3netaccess","",也要相应改成自己的IP, APN
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#9

帖子 xiaoyong » 2009-05-18 10:20

想省心的话,就用UMTSmon吧,只需要设置APN,并且联通是可以用移动的APN的——我刚刚试过(我还没有开通联通的gprs包月套餐)。

下载地址,http://people.debian.org/~winnie/umtsmon/
虽然是为debian打包的,ubuntu下也能用
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#10

帖子 xiaoyong » 2009-05-18 11:15

lxydlpding 写了:请把脚本发给我好吗
刚才查了一下我的系统,很抱歉,升级到9.04后,自建的那些配置文件已经没有了,应该是我升级过程中选了升级配置文件。

但我现在的gprs设备是可以用的,总结一下:

9.04下面,连接gprs设备,网络管理器(network-manger)应该会自动弹出配置对话框,说明系统已经识别了设备,选择相应国家和网络服务提供商(中国的条目下目前只有移动和联通两家),就应该可以连上网,但有时会不成功,随即掉线,这时在“用户和组“的配置里为当前用户勾选“使用modem联网”(该用户也应该在dialout组里),或者就可以了。

还有问题的话,用UMTSmon,连接设备,启动UMTSmon,新建一个profile,设置APN,然后 select network operator,让设备自己选,注册到服务提供商后,再点联网。随后,断开UMTSmon,重新用网络管理器连接3G/gprs网络,应该就可以了。

最后的建议,不必编写拨号脚本,让network-manager和UMTmon做这些底层的配置就可以了,nm不成功的话,再用UMTSmon,总可以的, : )
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#11

帖子 xiaoyong » 2009-05-18 11:44

相关讨论另一篇,有关wvdial拨移动gprs的,viewtopic.php?f=116&t=201779
lxydlpding
帖子: 12
注册时间: 2009-02-04 19:25

Re: 请教如何在9.04中设置联通GPRS

#12

帖子 lxydlpding » 2009-05-18 20:07

太棒了,辛苦你了xiaoyong,我再设置不好就对你不起了,成功后再发帖
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#13

帖子 xiaoyong » 2009-05-18 20:18

lxydlpding 写了:太棒了,辛苦你了xiaoyong,我再设置不好就对你不起了,成功后再发帖
不必客气,用 linux 就是要探索、摸索加分享的,: )
lxydlpding
帖子: 12
注册时间: 2009-02-04 19:25

Re: 请教如何在9.04中设置联通GPRS

#14

帖子 lxydlpding » 2009-05-18 21:42

利用UMTSmon轻松搞定!!!

不过我看着系统栏上的没有连接的图标心里就不舒服,用UMTSmon固然好,可是我还想用系统的东西,我将继续努力,谢谢关心!!成功后再发。。。
xiaoyong
帖子: 515
注册时间: 2006-05-20 10:38

Re: 请教如何在9.04中设置联通GPRS

#15

帖子 xiaoyong » 2009-05-18 22:34

lxydlpding 写了:利用UMTSmon轻松搞定!!!

不过我看着系统栏上的没有连接的图标心里就不舒服,用UMTSmon固然好,可是我还想用系统的东西,我将继续努力,谢谢关心!!成功后再发。。。
UMTSmon拨号成功后,再断开,就可以用network-manager连上了,虽然有时会不稳定,当然用网络管理器是有图标的,但重启后再次拨号时,可能还须先用UMTSmon连一下,然后断开,关闭UMTSmon,再打开网络管理器里的连接。
回复