TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: Jay Truesdale 72176,3565 (X)
from: Greg Law 72130,23
date: 1990-09-14 20:16:17
subject: #6560-OSK TSmon

#: 6690 S12/OS9/68000 (OSK)
    14-Sep-90  20:16:17
Sb: #6560-OSK TSmon
Fm: Greg Law 72130,23
To: Jay Truesdale 72176,3565 (X)

Jay,

        Writing an auto-baud detect TSMon is relatively trivial. The way I
handled that on the CoCo was to basically write a standard TSMon.  Once that
was working the way it should be, I added the CONNECT strings into the vsect
and then used a string compare routine. At the very basic level, I had it sit
in an I$ReadLn state waiting for a string. Once it gets a string it compares it
with CONNECT. If it isn't CONNECT (use a fixed string length compare, like
strncmp() in C), throw the string in the trash and loop to the I$ReadLn call.
        If it is CONNECT, compare the next character for a space or carriage
return (or carriage return and line feed). If you have a CR, it's 300 baud.
Otherwise, compare for 1200 or 2400. I even set it up so that it sent an
initialization string to the modem when it started.
        There are a couple of gotchas with this method. First and foremost, the
6551 ACIA in the CoCo shuts down the receiver section if DCD or DSR is low. If
your modem sends the string before bringing DCD high, it won't work with the
6551 (unless you cheat and strap DCD high). Some modems do it right (bring DCD
high and then send the string and, finally, change baud rate to match the
caller) while others do it not-so-right (send the string, bring DCD high, and
match baud rates).
        Keep in mind, the reason I send an initialization string to the modem
is two-fold. First, it makes absolutely sure we *know* the modem has matched
baud rates with us. It will then send all strings at this baud rate. (Nothing
like receiving CONNECT 2400 at 1200 baud while ACIAPAK is set for 300 baud.
) Secondly, it helps the user so he knows the modem is setup properly for
auto-answer, connect strings, etc. I don't recommend using numeric result
codes. The reason is that the codes are 1 or 2 bytes (0 through 15 or whatever)
with no carriage returns and ACIAPAK blocks on an I$Read if no data is pending.
Is that code a 1 or 10?

        -- Greg

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.