Re: ppp and nokia 6630



"Rodolfo Medina" <romeomedina@xxxxxxxxx> writes:
> "" "\d\d+++\d\dATH"
> '' ATZ

That sequence is bogus.

You're not waiting for anything (""), then sending "+++ ATH", then not
waiting for anything (again!), and then sending ATZ.

At that point, your modem is in an indeterminate state. Almost
anything could be expected to happen. It's equivalent to just this:

"" "\d\d+++\d\dATH\rATZ"

because an empty expect string in the expect-send pair means "just
send; don't expect."

The failure you're seeing is because the input stream to chat now has
*multiple* "OK" strings buffered in it, and it's impossible to tell
which "OK" you're matching against. And, indeed, the confusion is
evident in the results:

Jan 3 00:28:02 localhost chat[4000]: send (ATD*99#^M)
Jan 3 00:28:02 localhost chat[4000]: expect (CONNECT)
Jan 3 00:28:02 localhost chat[4000]: ^M
Jan 3 00:28:02 localhost chat[4000]: AT+CGATT=1^MA^M

You send something new, but are still receiving old data from the
modem.

If you must use +++ here due to flaws in the modem, then you're going
to have to achieve sync with the modem's command interface. It won't
be simple. Here's one suggestion:

# various failure codes
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED

# Attempt to interrupt a left-over call and get the modem's attention.
"" '\d\d+++\d\dATH'

# We may now have zero or more "OKs" waiting for us. Send the factory
# reset command, then send an additional dummy command, and assume
# that the factory defaults include echo-on.
"" AT&F
OK ATS0=0
S0=0-ATS0=0-S0=0 '\c'

# Now we are back in sync and can send our commands. Note that the
# last expect string INTENTIONALLY has "\c" as the send string, so
# that we won't send a stray CR at the end of chat.
OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK AT+CGATT=1
OK ATD*99#
CONNECT '\c'

--
James Carlson, KISS Network <james.d.carlson@xxxxxxx>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
.



Relevant Pages

  • Re: pppd-2.4.2 + kernel-2.6.7 problem
    ... I 've programmed my modem to have its speaker ... >ABORT 'NO CARRIER' ... What all does "Reset to Stored Profile 0" ... and it was echoed back to you - the command was ...
    (comp.os.linux.networking)
  • callback dialup, client linux - server NT
    ... ABORT "NO CARRIER" ... The chat program send a ATZ command but get no OK from my modem. ... Dec 10 21:51:13 redrat chat: Failed ...
    (comp.os.linux.networking)
  • Re: Modem ping: "chat -v -s ATZ < /dev/modem > /dev/modem" fails?
    ... I merely go into minicom and 'quit without reset' and things work okay ... without reset in order to talk to the modem on the command line again. ... ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT\ ...
    (comp.os.linux.misc)
  • Re: problems with wvdial
    ... resetting the modem. ... at the moment it is only issuing the ATZ command. ... --> Waiting for carrier. ...
    (comp.os.linux.networking)
  • One Method: PPP
    ... Modem worked fine with Ubuntu for two weeks, ... Here is my setting via pppconfig ... <Properties of pstel1> ... ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO ...
    (Ubuntu)