[comp.lang.pascal] Simple modem control in TP6.0

mcintyre@cs.rpi.edu (David McIntyre) (06/23/91)

I'm pulling out my hair trying to do this, so instead of insanity, I
figured I'd just ask y'all to give me the (probably simple) solution:

I need to dial a number with my modem, connect at 1200 baud, get a
few lines of characters that the remote will download, and then
disconnect.

I don't need anything fancy - actually every solution I come up with
seems to be too elegant or too fancy.  I just want to dial a number,
capture a few lines of data, then hang up.  I don't even need to send
anything to the remote!

Can someone just send me a few lines of TP that will do this?  I'm
sure it's an easy problem for someone used to programming serial
communications on PC's, but that's not my bag.

				Thanks, Dave


-- 
 Dave "mr question" McIntyre   +-----+   "....say you're thinking about a plate
 mcintyre@turing.cs.rpi.edu    |  ?  |    of shrimp.....and someone says to
 office : 518-276-8633         +-----+    you 'plate,' or 'shrimp'......"

Keith.Vertanen@tdkt.kksys.MN.ORG (Keith Vertanen) (06/24/91)

 DM>I need to dial a number with my modem, connect at 1200 baud, get a
 DM>few lines of characters that the remote will download, and then
 DM>disconnect.

Have you considered just writing a script file for a term program such as
Telix or Qmodem?  You could do everything you said rather easily.  Or do
you need a stand-alone program?


 * Origin: Altered Dimensions (612) 779-6018 (1:282/73)

roth@oasys.dt.navy.mil (Pete Roth) (06/24/91)

In article <48albtd@rpi.edu> mcintyre@cs.rpi.edu (David McIntyre) writes:
>I need to dial a number with my modem, connect at 1200 baud, get a
>few lines of characters that the remote will download, and then
>disconnect.

Well, I don't know _how_ simple is simple, but you might take a look
at the example code in PCTechniques magazine of June/july 1991.
An article by Alex Lane & Richard Nelson of Borland give a great
example of what they call a complete communications terminal in
530 lines of code. Too long for me to type in, but you may be able to
get the code from CompuServ. GO CLMFORUM and select PCTECHNIQUES from
the message area. I guess they have a way to download stuff from there,
but my comm situation is such that I can't download CIS stuff yet.

BTW, PCTechniques is pretty good reading for those of us trying to
figure out what the &*(^ this object oriented stuff _is_.

regards,

pete

- - - - - - - - - - - - - - - - - - - - - - - - - -
Peter N Roth      roth@oasys.dt.navy.mil
Objects in this office are closer than they appear.
"...Miller, you don't even know how to drive." "That's right!
'cause the more you drive, the less intelligent you are."

rind@popvax.uucp (747707@d.rind) (06/25/91)

In article <48albtd@rpi.edu> mcintyre@cs.rpi.edu (David McIntyre) writes:
>I need to dial a number with my modem, connect at 1200 baud, get a
>few lines of characters that the remote will download, and then
>disconnect.
>Can someone just send me a few lines of TP that will do this?  I'm
>sure it's an easy problem for someone used to programming serial
>communications on PC's, but that's not my bag.

Unfortunately, it's not that easy to control the modem and it is
unlikely that there are any "few lines" that will solve your
problem.  The last time someone asked this question I sent
a demo program to garbo which shows how to read and write
COM1 and COM2 and how to set various modem parameters (baud rate,
word length, etc.).  I believe it can be found in faquote.txt
in the tsfaq21.arc file.
David Rind
rind@popvax.harvard.edu