当前位置: 技术问答>linux和unix
问个拨号脚本问题
来源: 互联网 发布时间:2015-11-29
本文导语: 现在在LINUX下用程序拨号都能拨上,为什么用脚本拨号会出毛病?? exec chat -v TIMEOUT 8 ...
现在在LINUX下用程序拨号都能拨上,为什么用脚本拨号会出毛病??
exec chat -v
TIMEOUT 8
ABORT 'nBUSYr'
ABORT 'nNO ANSWERr'
ABORT 'nRINGINGrnrnRINGINGr'
'' 'AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0'
TIMEOUT 45
OK ATDT$TELEPHONE
CONNECT 'rAT'
sername: 'AT 16300'
assword: 'AT 16300'
这个是脚本的部分
显示的LOG如下 到密码的时候为什么没有反映?还需要有相关的设置吗?
Jun 8 09:18:34 turbo7 pppd[1113]: pppd 2.4.0 started by root, uid 0
Jun 8 09:18:35 turbo7 chat[1114]: timeout set to 8 seconds
Jun 8 09:18:35 turbo7 chat[1114]: abort on (nBUSYr)
Jun 8 09:18:35 turbo7 chat[1114]: abort on (nNO ANSWERr)
Jun 8 09:18:35 turbo7 chat[1114]: abort on (nRINGINGrnrnRINGINGr)
Jun 8 09:18:35 turbo7 chat[1114]: send (AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0^M)
Jun 8 09:18:35 turbo7 sshd[1115]: Accepted password for zhujia from 172.16.10.124 port 1182
Jun 8 09:18:35 turbo7 sshd[1115]: packet_set_maxsize: setting to 4096
Jun 8 09:18:35 turbo7 system-auth(pam_unix)[1115]: session opened for user zhujia by (uid=0)
Jun 8 09:18:35 turbo7 chat[1114]: timeout set to 45 seconds
Jun 8 09:18:35 turbo7 chat[1114]: expect (OK)
Jun 8 09:18:35 turbo7 chat[1114]: AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0^M^M
Jun 8 09:18:35 turbo7 chat[1114]: OK
Jun 8 09:18:35 turbo7 chat[1114]: -- got it
Jun 8 09:18:35 turbo7 chat[1114]: send (ATDT9,16300^M)
Jun 8 09:18:36 turbo7 chat[1114]: expect (CONNECT)
Jun 8 09:18:36 turbo7 chat[1114]: ^M
Jun 8 09:19:14 turbo7 chat[1114]: ATDT9,16300^M^M
Jun 8 09:19:14 turbo7 chat[1114]: CONNECT
Jun 8 09:19:14 turbo7 chat[1114]: -- got it
Jun 8 09:19:14 turbo7 chat[1114]: send (^M)
Jun 8 09:19:14 turbo7 chat[1114]: expect (sername:)
Jun 8 09:19:14 turbo7 chat[1114]: 38400^M
Jun 8 09:19:14 turbo7 chat[1114]: ^M
Jun 8 09:19:15 turbo7 chat[1114]: ^M
Jun 8 09:19:15 turbo7 chat[1114]: *********************************^M
Jun 8 09:19:15 turbo7 chat[1114]: * Quidway A8010 Internet Server *^M
Jun 8 09:19:15 turbo7 chat[1114]: * welcome!! *^M
Jun 8 09:19:15 turbo7 chat[1114]: *********************************^M
Jun 8 09:19:15 turbo7 chat[1114]: please input username:
Jun 8 09:19:15 turbo7 chat[1114]: -- got it
Jun 8 09:19:15 turbo7 chat[1114]: send (16300^M)
Jun 8 09:19:15 turbo7 chat[1114]: expect (assword:)
Jun 8 09:20:00 turbo7 chat[1114]: alarm
Jun 8 09:20:00 turbo7 chat[1114]: Failed
Jun 8 09:20:00 turbo7 pppd[1113]: Connect script failed
Jun 8 09:20:01 turbo7 pppd[1113]: Exit.
为什么到密码会不行了?手动拨的话是正常的。。。高人给个帮助
exec chat -v
TIMEOUT 8
ABORT 'nBUSYr'
ABORT 'nNO ANSWERr'
ABORT 'nRINGINGrnrnRINGINGr'
'' 'AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0'
TIMEOUT 45
OK ATDT$TELEPHONE
CONNECT 'rAT'
sername: 'AT 16300'
assword: 'AT 16300'
这个是脚本的部分
显示的LOG如下 到密码的时候为什么没有反映?还需要有相关的设置吗?
Jun 8 09:18:34 turbo7 pppd[1113]: pppd 2.4.0 started by root, uid 0
Jun 8 09:18:35 turbo7 chat[1114]: timeout set to 8 seconds
Jun 8 09:18:35 turbo7 chat[1114]: abort on (nBUSYr)
Jun 8 09:18:35 turbo7 chat[1114]: abort on (nNO ANSWERr)
Jun 8 09:18:35 turbo7 chat[1114]: abort on (nRINGINGrnrnRINGINGr)
Jun 8 09:18:35 turbo7 chat[1114]: send (AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0^M)
Jun 8 09:18:35 turbo7 sshd[1115]: Accepted password for zhujia from 172.16.10.124 port 1182
Jun 8 09:18:35 turbo7 sshd[1115]: packet_set_maxsize: setting to 4096
Jun 8 09:18:35 turbo7 system-auth(pam_unix)[1115]: session opened for user zhujia by (uid=0)
Jun 8 09:18:35 turbo7 chat[1114]: timeout set to 45 seconds
Jun 8 09:18:35 turbo7 chat[1114]: expect (OK)
Jun 8 09:18:35 turbo7 chat[1114]: AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0^M^M
Jun 8 09:18:35 turbo7 chat[1114]: OK
Jun 8 09:18:35 turbo7 chat[1114]: -- got it
Jun 8 09:18:35 turbo7 chat[1114]: send (ATDT9,16300^M)
Jun 8 09:18:36 turbo7 chat[1114]: expect (CONNECT)
Jun 8 09:18:36 turbo7 chat[1114]: ^M
Jun 8 09:19:14 turbo7 chat[1114]: ATDT9,16300^M^M
Jun 8 09:19:14 turbo7 chat[1114]: CONNECT
Jun 8 09:19:14 turbo7 chat[1114]: -- got it
Jun 8 09:19:14 turbo7 chat[1114]: send (^M)
Jun 8 09:19:14 turbo7 chat[1114]: expect (sername:)
Jun 8 09:19:14 turbo7 chat[1114]: 38400^M
Jun 8 09:19:14 turbo7 chat[1114]: ^M
Jun 8 09:19:15 turbo7 chat[1114]: ^M
Jun 8 09:19:15 turbo7 chat[1114]: *********************************^M
Jun 8 09:19:15 turbo7 chat[1114]: * Quidway A8010 Internet Server *^M
Jun 8 09:19:15 turbo7 chat[1114]: * welcome!! *^M
Jun 8 09:19:15 turbo7 chat[1114]: *********************************^M
Jun 8 09:19:15 turbo7 chat[1114]: please input username:
Jun 8 09:19:15 turbo7 chat[1114]: -- got it
Jun 8 09:19:15 turbo7 chat[1114]: send (16300^M)
Jun 8 09:19:15 turbo7 chat[1114]: expect (assword:)
Jun 8 09:20:00 turbo7 chat[1114]: alarm
Jun 8 09:20:00 turbo7 chat[1114]: Failed
Jun 8 09:20:00 turbo7 pppd[1113]: Connect script failed
Jun 8 09:20:01 turbo7 pppd[1113]: Exit.
为什么到密码会不行了?手动拨的话是正常的。。。高人给个帮助
|
顶!!