an embedded linux ppp problem
I am running busybox in an embedded application. I have the chat script working up to the login portion. At that point the script hangs waiting for the "ogin:". When I have the modem hooked up to my laptop and manually dialed into the callin server I get the right prompts. However when the modem is connected to the embedded device, the last message sent is CONNECT 115200.
Here are is some of the scripts:
$ cat ppp-on #!/bin/sh PHN=xxxxxxxxxxx TELEPHONE=$PHN ACCOUNT=xxxxxxxx PASSWORD=xxxxxxx LOCAL_IP=0.0.0.0 REMOTE_IP=0.0.0.0 NETMASK%5.255.255.0 PROTOCOL=PPP export TELEPHONE ACCOUNT PASSWORD PROTOCOL DIALER_SCRIPT=/etc/ppp/ppp-on-dialer /bin/setserial /dev/ttyAM1 auto_irq autoconfig exec pppd $LOCAL_IP:$REMOTE_IP /dev/ttyAM1 115200 modem connect $DIALER_SCRIPT &
$ cat ppp-on-dialer #!/bin/sh /usr/sbin/chat -E -v -s -f /etc/ppp/pppconnect
$ cat pppconnect TIMEOUT 6 ABORT 'BUSY' ABORT 'NO ANSWER' '' AT 'OK' ATH0 TIMEOUT 60 OK ATDTxxxxxxxxxxx CONNECT '' ogin: xxxxx assword: 'xxxxxx
Here what the connect-errors shows:
timeout set to 6 seconds
abort on (BUSY)
abort on (NO ANSWER)
send (AT^M)
expect (OK)
AT^M^M
OK
-- got it
send (ATH0^M)
timeout set to 60 seconds
expect (OK)
^M
ATH0^M^M
OK
-- got it
send (ATDT18669686661^M)
expect (CONNECT)
^M
ATDT18669686661^M^M
MESSAGE-WAITING^M
^M
CONNECT
-- got it
send (^M)
expect (115200)
115200
-- got it
send ( ^M)
expect (allin)
^M
alarm
Failed
Any suggestions of what to try are greatly appreciated.
James
Quoted 1 line · James Shaker
CONNECT ''
This tells the chat script to send a CR right after seeing the word "CONNECT." Try using this instead:
CONNECT '\c'
... to tell it to send nothing when it sees CONNECT.
Quoted 5 lines
expect (115200)
115200
-- got it
send ( ^M)
expect (allin)
That sure doesn't look like a log from this chat script. It doesn't match at all.
Are you sure you're using the desired chat script?
Where's the chat script that expects to see "allin" instead of "login:"?
Signature · 1 line
James Carlson 42.703N 71.076W <[email protected]>
Quoted 5 lines · James Shaker
I am running busybox in an embedded application. I have the chat script working up to the login portion. At that point the script hangs waiting for the "ogin:". When I have the modem hooked up to my laptop and manually dialed into the callin server I get the right prompts. However when the modem is connected to the embedded device, the last message sent is CONNECT 115200.
I do not know who your privider is but almost none want you to logon first. End your chat script with
CONNECT '\d\c'
Quoted 23 lines
Here are is some of the scripts:
$ cat ppp-on #!/bin/sh PHN=xxxxxxxxxxx TELEPHONE=$PHN ACCOUNT=xxxxxxxx PASSWORD=xxxxxxx LOCAL_IP=0.0.0.0 REMOTE_IP=0.0.0.0 NETMASK%5.255.255.0 PROTOCOL=PPP export TELEPHONE ACCOUNT PASSWORD PROTOCOL DIALER_SCRIPT=/etc/ppp/ppp-on-dialer /bin/setserial /dev/ttyAM1 auto_irq autoconfig exec pppd $LOCAL_IP:$REMOTE_IP /dev/ttyAM1 115200 modem connect $DIALER_SCRIPT &$ cat ppp-on-dialer #!/bin/sh /usr/sbin/chat -E -v -s -f /etc/ppp/pppconnect
Quoted 9 lines
$ cat pppconnect TIMEOUT 6 ABORT 'BUSY' ABORT 'NO ANSWER' '' AT 'OK' ATH0 TIMEOUT 60 OK ATDTxxxxxxxxxxx CONNECT ''
replace this with
CONNECT '\d\c'
and remove the rest of the script.
Quoted 51 lines
ogin: xxxxx
assword: 'xxxxxxHere what the connect-errors shows:
timeout set to 6 seconds
abort on (BUSY)
abort on (NO ANSWER)
send (AT^M)
expect (OK)
AT^M^M
OK
-- got itsend (ATH0^M)
timeout set to 60 seconds
expect (OK)
^M
ATH0^M^M
OK
-- got itsend (ATDT18669686661^M)
expect (CONNECT)
^M
ATDT18669686661^M^M
MESSAGE-WAITING^M
^M
CONNECT
-- got itsend (^M)
expect (115200)
115200
-- got itsend ( ^M)
expect (allin)
^M
alarm
FailedAny suggestions of what to try are greatly appreciated.
James
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 4 lines
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273 Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324 UBC, Vancouver,BC | Program in Cosmology | [email protected] Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/