使用聊天脚本时,pppd无法接收

时间:2015-05-21 08:32:28

标签: linux pppd

使用PPPD拨打调制解调器时出现问题。

这是我使用的文件pppd_script。

# Debug info from pppd
debug
#kdebug 4
# Most phones don't reply to LCP echos
lcp-echo-failure 3
lcp-echo-interval 3
# Keep pppd attached to the terminal
# Comment this to get daemon mode pppd
nodetach
# The chat script (be sure to edit that file, too!)
connect "/usr/bin/chat -V -s -f /etc/ppp/chat_script"
# Serial Device to which the HSDPA phone is connected
/dev/ttyO0
# Serial port line speed
115200
dump
# The phone is not required to authenticate
#noauth
# If you want to use the HSDPA link as your gateway
defaultroute
# pppd must not propose any IP address to the peer
#noipdefault
ipcp-accept-local
ipcp-accept-remote
# Keep modem up even if connection fails
#persist
# Hardware flow control
crtscts
# Ask the peer for up to 2 DNS server addresses
usepeerdns
# No ppp compression
novj
nobsdcomp
novjccomp
nopcomp
noaccomp
# For sanity, keep a lock on the serial line
lock
# Show password in debug messages
show-password

以下是chat_script

#!/system/bin/sh
# Connection to the network
'' AT+CGDCONT=1,"IP","telstra.internet"
# Dial the number.
OK ATD*99***1#
# The modem is waiting for the following answer

当我运行命令pppd文件pppd_script时,pppd命令停留在

send( AT+CGDCONT=1,"IP","telstra.internet" )
expect(OK)

然而,当我使用下面的命令时,我可以得到OK。

echo "AT+CGDCONT=1,"IP","telstra.internet"" >/dev/ttyO0

我重新编译了pppd和聊天脚本,但仍然是同样的事情。

陷入困境的原因是什么?

0 个答案:

没有答案