ubuntu10.04 和8.04下ppp拨号一点反应都没有

fishly_0 2010-12-08 08:40:17
rt,我想试试桌面linux下的ppp拨号,下了ppp-2.4.4进行编译,但是在执行ppp-on的时候,一点提示都没有。如果单独执行pppd,那么是有一堆拨号的字符出现的。后来经过逐步排查,发现是脚本里pppd带的参数问题,主要有2个
1,如果有指定拨号端口,如:ttyS0或者ttyUSB0,那么执行拨号脚本一点反应都没有,在脚本里添加了echo语句,发现执行完exec就结束了,不会接着调用ppp-on-dialer脚本。
2,如果没有指定拨号端口,并且pppd带有其他参数,那么ppp-on-dialer脚本有执行,并且有几个字符提示
3,如果删除pppd所带的参数,那么执行ppp-on会出现一大堆的拨号字符,这个似乎是比较正常的。

问下有玩过ppp拨号的兄弟们,这是怎么回事阿?
脚本如下:
ppp-0n
#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command. However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=555-1212 # The telephone number for the connection
ACCOUNT= # The account name for logon (as in 'George Burns')
PASSWORD= # The password for this account (and 'Gracie Allen')
LOCAL_IP=0.0.0.0 # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0 # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in. Please use the absolute file name as the $PATH variable is not
# used on the connect option. (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/home/simon/usb_serial/Linux_dial/dial/ppp-on-dialer
#
# Initiate the connection
#
# I put most of the common options on this command. Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /home/simon/usb_serial/Linux_dial/dial/pppd debug lock modem /dev/ttyUSB0 38400 \
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT






ppp-on-dialer
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
echo "ppp-on-dialer"
exec chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 30 \
OK ATDT$TELEPHONE \
CONNECT '' \
ogin:--ogin: $ACCOUNT \
assword: $PASSWORD


...全文
367 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zuijinzhao 2013-06-04
  • 打赏
  • 举报
回复
怎么实现的?分享一下啊
fishly_0 2010-12-23
  • 打赏
  • 举报
回复
解决了,还是把答案贴上来吧:
ppp的拨号输出可以在 /var/log/message 下查看

ppp拨号不成功,是因为我用的是wcdma的模块,不需要用户名密码,我把ppp-on-dialer的最后两行去掉,就可以拨上去了,如下:
ogin:--ogin: $ACCOUNT \
assword: $PASSWORD
fishly_0 2010-12-08
  • 打赏
  • 举报
回复
谢谢2位,其实我主要是想学习学习用ppp拨号的过程的。
steptodream 2010-12-08
  • 打赏
  • 举报
回复
看看这个Ubuntu的wiki
http://wiki.ubuntu.org.cn/ADSL%EF%BC%88PPPOE%EF%BC%89%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97
freetstar 2010-12-08
  • 打赏
  • 举报
回复
我一般直接sudo pppoeconf拨号,然后一步步按照屏幕提示走的...

都没有手动编译过

23,216

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧