0

I have a problem when using PPPD to dial a modem.

Here is the file pppd_script I used.

# 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

And below are the 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

When I run the command pppd file pppd_script, the pppd command stuck at

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

However, when I use the command below, I can get the OK.

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

I recompiled the pppd and chat script, but still the same thing.

What could be the reason for getting stuck?

artless noise
  • 21,212
  • 6
  • 68
  • 105
  • Run `stty -a -F /dev/ttyO0` and look at the line control. You have `crtscts` and there is also 'dtr'. Do you have equivalents with `stty`? If not, then there maybe a flow control issue. You can use `strace` to diagnose and `chat -v` should show all characters received. Ie, chat is not getting OK. – artless noise May 21 '15 at 15:21
  • Here is the output of the stty : root@localhost:~# stty -F /dev/ttyO0 speed 115200 baud; line = 0; -brkint -imaxbel – user2430607 May 21 '15 at 22:54

0 Answers0