* an embedded linux ppp problem
@ 2005-11-22 16:03 James Shaker
2005-11-22 16:26 ` James Carlson
2005-11-22 19:19 ` Bill Unruh
0 siblings, 2 replies; 3+ messages in thread
From: James Shaker @ 2005-11-22 16:03 UTC (permalink / raw)
To: linux-ppp
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: an embedded linux ppp problem
2005-11-22 16:03 an embedded linux ppp problem James Shaker
@ 2005-11-22 16:26 ` James Carlson
2005-11-22 19:19 ` Bill Unruh
1 sibling, 0 replies; 3+ messages in thread
From: James Carlson @ 2005-11-22 16:26 UTC (permalink / raw)
To: linux-ppp
James Shaker writes:
> 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.
> 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:"?
--
James Carlson 42.703N 71.076W <carlsonj@workingcode.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: an embedded linux ppp problem
2005-11-22 16:03 an embedded linux ppp problem James Shaker
2005-11-22 16:26 ` James Carlson
@ 2005-11-22 19:19 ` Bill Unruh
1 sibling, 0 replies; 3+ messages in thread
From: Bill Unruh @ 2005-11-22 19:19 UTC (permalink / raw)
To: linux-ppp
On Tue, 22 Nov 2005, James Shaker wrote:
> 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'
>
> 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 ''
replace this with
CONNECT '\d\c'
and remove the rest of the script.
> 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
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
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 | unruh@physics.ubc.ca
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-22 19:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 16:03 an embedded linux ppp problem James Shaker
2005-11-22 16:26 ` James Carlson
2005-11-22 19:19 ` Bill Unruh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox