Communications through t

 BBS: Inland Empire Archive
Date: 02-10-93 (02:12)             Number: 336
From: ROB MCKEE                    Refer#: NONE
  To: CALVIN FRENCH                 Recvd: NO  
Subj: Communications through t       Conf: (2) Quik_Bas
Hello Calvin!
   You wrote in a message to Joe Negron:

 JN>   > PRINT #1,"+++"
 CF> "+++" doesn't always work. To do it properly, you need to
 CF> read   the modem register [just a second let me get my
 CF> manual] "S2" and   see what it is. It's 043 normally, and
 CF> that's ASCII "+++".   Although I diddn't read the messages,
 CF> I picked up on this. This   can cause some _very_ annoying
 CF> bugs in some cases, I imagine.   Hope that helps out,

If it is set to >128 then the Escape Character is disabled on 90% of modems

The proper way to do it is:
 During program Start up.. Psuedo code follows

 IF NOT CD% then
    Print #ComPort,"ATS2?"
    GetLine Comport, Theline$
    If TheLine$= "ATS2?" then
        GetLine Comport, Theline$
        If TheLine$= "" then
            GetLine Comport, Theline$
        End if
    if ModemEscape$< chr$(128) then
        ModemEscape$= True
        ModemEscape$= Else
    Connection%= False
    ' Assume "+" since modem is talking to somebody
    ' and the connection is hot
    ModemEscape$= True
    Connection%= True

 Then to Issue the Escape String

 d!=(Timer + Delay!) mod 86400&
 If D!<timer then Do: loop until Int(Timer=0)
 Do: Loop until Timer=>d!
 ? #ComPort, ModemEscape$+ModemEscape$+ModemEscape$;
 d!=(Timer + Delay!) mod 86400&
 If D!<timer then Do: loop until Fix(Timer)=0
 Do: Loop until Timer=>d!
 WaitFor ComPort,"OK"
 ' do what ever you need to do.....

 You also have to be aware of modems that use the TIES
escape which is "+++AT" and doesn't use the Hayes Time
guard before or after the Escape sequence.  To further
Explain here is a Healthy quote from the HAYES WhitePaper
on TIES which is available from the HAYES BBS:
 Hayes Microcomputer.......... GA 1-404-446-6336 96V

As part of his intensive research in the development of the original Hayes
Smartmodem, Dale Heatherington solved this inherent
limitation by  surrounding the escape code, a sequence of
characters, with guard times  on both sides to alert the
modem that the sequence is distinguished from  a typical
string of characters in a file transmission.  This escape

                <guard time>    <escape code>    <guard time>

virtually eliminates the limitation inherent in a data-dependent escape
sequence because of its use of time and because it does not
depend on the  probability of character occurrence in a
stream of data.  It is virtually  impossible for the Hayes
escape sequence with guard time to appear in a  file
transfer and cause an unintentional escape using the common
file  transfer protocols.

Dale Heatherington's invention led to the issuance of United States  Patent
Number 4,549,302, the Modem With Improved Escape Sequence
With  Guard Time Mechanism, often called the Hayes '302
Patent, and  corresponding patents in a number of
countries.  The Hayes '302 Patent  ensures that modems
escape or change to the Command Mode of operation  reliably
and without the possibility that data alone could trigger
the  escape.  In over eleven years of use of the Hayes
'302, Hayes has never  received a complaint about an
unintentional escape.  In addition, this  mechanism was
copied by almost everyone in the industry making it one of
the most widely adopted and enduring defacto standards.

This "new" escape mechanism is called Time Independent Escape Sequence or
TIES.  The name appears to derive from the way in which the
escape  sequence works because it does not make use of time
as the Hayes '302  does.  TIES depends entirely upon the
appearance of the escape sequence  in the stream of data
being received by the modem.  The TIES escape  mechanism is
similar to the escape mechanism in use at the time of the
invention of the Hayes '302 in that an escape can be
triggered by the  data being sent as part of a file

TIES - What Is It?

The simplest escape sequence for TIES is "+++AT<CR>" where
"+++" stands  for any escape character and "<CR>"
represents carriage return or any  character assigned in
the modem registers by the AT command set which  designates
the end of the command. When that series of characters
appears  in the data stream, the modem can "escape" or
change from
Receive/Transmit Mode to Command Mode of operation.  In effect, what  happens
at that point in the transmission is that the flow of data
stops.   The flow of data would halt simply because the
characters which make up  the escape sequence would have
appeared in the data being transmitted.

 Catcha Later , I'll see you on the flip side - Rob

--- timEd/B6
 * Origin: Another Quik_Bas Point in Richmond, CA (1:125/411)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET