pppd: connect script failed

3,329 views
Skip to first unread message

ehung

unread,
Apr 14, 2009, 3:47:10 AM4/14/09
to android-platform
Hi everyone
I want to make a connection to internet with modem througth pppd
function.
But I got the error when I made a connection.
The error log is "pppd: connect script failed".
The below is my pppd and chat script file.

/** ppp-on ***
MYNAME=username
echo "PPP is using account ${MYNAME} to connect to ISP ${ISP} ..."
DIALER_SCRIPT=/data/HSDPA/pppondialer
exec /system/bin/pppd -detach modem crtscts \
/dev/modem 460800 noipdefault defaultroute \
noauth name ${MYNAME} connect $DIALER_SCRIPT

/**** pppondialer *****
exec /system/usr/bin/chat -v \
ABORT '\nNO DIALTONE\r' \
ABORT '\nBUSY\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO ANSWER\r' \
'' 'ATZ' \
OK ATDT*99***1# \
CONNECT ''

Could someone give me some suggestion?
Thank in advance
ehung

François Guillemé

unread,
Apr 14, 2009, 4:39:20 AM4/14/09
to android-...@googlegroups.com
try ro run your chat line alone against /dev/modem
anyway I wonder why you put double quote around ATZ...CONNEC.
You also forgot to setup AT+CGDCONT=1,"IP","yourapn" before dialing

2009/4/14 ehung <ehun...@gmail.com>



--
François

ehung

unread,
Apr 14, 2009, 5:55:27 AM4/14/09
to android-platform
Hi François
Thanks for your reply.
I have remove double quote around ATZ...CONNEC and tried to run my
chat line alone.
But I got nothing form logcat and the chat process is still existence
until I kill that process.
If I just execute pppd /dev/modem, I got different log message.
========== logcat message ============
pppd : using channel 1
pppd : using interface ppp0
pppd : Connect : ppp0 <--> /dev/modem
pppd : LCP: timeout sending Config-Requests
pppd : Connection terminated
pppd : using channel 2
pppd : using interface ppp0
pppd : Connect : ppp0 <--> /dev/modem
pppd : tcflush failed: m
=======================================
Sorry to trouble you.
Could you give me some advice?
thank you.

ehung




On 4月14日, 上午4時39分, François Guillemé <franc...@guilleme.net> wrote:
> try ro run your chat line alone against /dev/modem
> anyway I wonder why you put double quote around ATZ...CONNEC.
> You also forgot to setup AT+CGDCONT=1,"IP","yourapn" before dialing
>
> 2009/4/14 ehung <ehung1...@gmail.com>

François Guillemé

unread,
Apr 14, 2009, 6:34:41 AM4/14/09
to android-...@googlegroups.com
Ok now you get connected but since you dial without defining AT+CGDCONT as I explained in my previous mail, pppd has nobody to talk to. you must define the apn prior to dialing in your chat script. Then pppd should be able to talk to a ppp server on the other side. add debug option to your pppd config to get more info about what is happening. There is a mistake in the pppd android code. It doesn't display correctly he franes in debug. It is pretty easy to fix.

2009/4/14 ehung <ehun...@gmail.com>



--
François

ehung

unread,
Apr 14, 2009, 11:14:17 PM4/14/09
to android-platform

Hi François
I have modified the script file as below but I got the same result.
pppd: connect script failed

/** ppp-on ***
MYNAME=username
echo "PPP is using account ${MYNAME} to connect to ISP ${ISP} ..."
DIALER_SCRIPT=/data/HSDPA/pppondialer
exec /system/bin/pppd -detach modem crtscts debug \
/dev/modem 460800 noipdefault defaultroute \
noauth name ${MYNAME} connect $DIALER_SCRIPT

/**** pppondialer *****
exec /system/usr/bin/chat -v \
ABORT '\nNO DIALTONE\r' \
ABORT '\nBUSY\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO ANSWER\r' \
'ATZ' \
AT+CGDCONT=1 "IP" "Fetnet01" \
OK ATDT*99***1# \
CONNECT

Another way, If I test it on the fedora linux os, I can get the chat
log message.
When I change the chat command from fedora system to the another chat
command that made by busybox,
I can't get chat log message anymore.

How do you think?
Thanks in advance again.
ehung


On 4月14日, 下午6時34分, François Guillemé <franc...@guilleme.net> wrote:
> Ok now you get connected but since you dial without defining AT+CGDCONT as I
> explained in my previous mail, pppd has nobody to talk to. you must define
> the apn prior to dialing in your chat script. Then pppd should be able to
> talk to a ppp server on the other side. add debug option to your pppd config
> to get more info about what is happening. There is a mistake in the pppd
> android code. It doesn't display correctly he franes in debug. It is pretty
> easy to fix.
>
> 2009/4/14 ehung <ehung1...@gmail.com>
> François- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

François Guillemé

unread,
Apr 15, 2009, 5:55:05 AM4/15/09
to android-...@googlegroups.com
I think it should be

exec /system/usr/bin/chat -v \
ABORT '\nNO DIALTONE\r' \
ABORT '\nBUSY\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO ANSWER\r' \
'' 'ATZ' \
OK 'AT+CGDCONT=1,"IP","Fetnet01"' \
OK ATDT*99***1# \
CONNECT

2009/4/15 ehung <ehun...@gmail.com>



--
François

ehung

unread,
Apr 15, 2009, 9:44:02 PM4/15/09
to android-platform
Hi François
I have modified the script file, but the log message shows the same
error.
pppd: connect script failed
Does the chat command has something worong when I made it by busybox?
I feel that chat command doesn't work but I am not sure.
Thanks for your help!

ehung



On 4月15日, 下午5時55分, François Guillemé <franc...@guilleme.net> wrote:
> I think it should be
>
> exec /system/usr/bin/chat -v \
> ABORT '\nNO DIALTONE\r' \
> ABORT '\nBUSY\r' \
> ABORT '\nNO CARRIER\r' \
> ABORT '\nNO ANSWER\r' \
> '' 'ATZ' \
> OK 'AT+CGDCONT=1,"IP","Fetnet01"' \
> OK ATDT*99***1# \
> CONNECT
>
> 2009/4/15 ehung <ehung1...@gmail.com>
Reply all
Reply to author
Forward
0 new messages