用pppd2.4.4拨号上网16300。将用户名发出后服务器接受但接收密码时没有了反应。写的ppp-on脚本和ppp-on-dialer及日志如下。
ppp-on脚本 TELEPHONE=0,16300 # The telephone number for the connection ACCOUNT=16300 # The account name for **n (as in 'George Burns') PASSWORD=16300 # 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
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS0 38400 \ asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \ noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
ppp-on-dialer脚本 exec chat -v \ TIMEOUT 3 \ ABORT '\nBUSY\r' \ ABORT '\nNO ANSWER\r' \ ABORT '\nRINGING\r\n\r\nRINGING\r' \ '' '\rAT L0' \ 'OK-+++\c-OK' ATH0 \ TIMEOUT 30 \ OK ATDT$TELEPHONE \ CONNECT '' \ sername:--sername: $ACCOUNT \ assword: $PASSWORD
观察日志如下 Jan 11 19:14:22 localhost chat[30956]: send (ATDT0,16300^M) Jan 11 19:14:22 localhost chat[30956]: expect (CONNECT) Jan 11 19:14:22 localhost chat[30956]: ^M Jan 11 19:14:33 localhost chat[30956]: ATDT0,16300^M^M Jan 11 19:14:33 localhost chat[30956]: CONNECT Jan 11 19:14:33 localhost chat[30956]: -- got it Jan 11 19:14:33 localhost chat[30956]: send (^M) Jan 11 19:14:33 localhost chat[30956]: expect (sername:) Jan 11 19:14:33 localhost chat[30956]: 38400/V42BIS^M Jan 11 19:14:33 localhost chat[30956]: ^M Jan 11 19:14:33 localhost chat[30956]: ^M Jan 11 19:14:33 localhost chat[30956]: *********************************^M Jan 11 19:14:33 localhost chat[30956]: * Quidway A8010 Internet Server *^M Jan 11 19:14:33 localhost chat[30956]: * welcome!! *^M Jan 11 19:14:33 localhost chat[30956]: *********************************^M Jan 11 19:14:33 localhost chat[30956]: please input username: Jan 11 19:14:33 localhost chat[30956]: -- got it Jan 11 19:14:33 localhost chat[30956]: send (16300^M) Jan 11 19:14:33 localhost chat[30956]: expect (assword:) Jan 11 19:15:03 localhost chat[30956]: alarm Jan 11 19:15:03 localhost chat[30956]: Failed Jan 11 19:15:03 localhost pppd[30955]: Connect script failed Jan 11 19:15:04 localhost pppd[30955]: Exit. 由此可见chat一直没有等到输入密码的提示,但在minicom下是提示输入用户名和密码的。还有用**p是可以连接到16300的,这应该说明pppd应该没有问题了吧,有没有遇到这种情况的,已经郁闷3天了还没有解决。
|