🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2622

Modems and Turbo C

#2622
From: Jonathan W Miner
Date: Thu, 11 Oct 1990 03:39
23 lines
1510 bytes
Here is a quick summary of my problem:

   I want to get my PC to call the campus mainframe from time to time
   to check my electronic mail.  I am having problems communicating
   with my modem.  Here is my code:

      fp = fopen("com1","r+");          /* open for read & write */
      fprintf("atd0000000\n");          /* send dial sequence */
      while (fgetc(fp) != 'T');         /* Wait for connection */

   That dials fine, but if I try to read the modem's result codes I
   never get them.  I would like to set up a loop to wait until the
   modem responds with "CONNECT", and then at other points to respond
   to prompts from the mainframe.

   Any suggestions? Please E-MAIL, since being an undergrad I don't
   allways have time to read the net.  I'll post a summary of solutions.

---------------------------------------------------------------------
Jonathan Miner                    | I don't, and will not, speak
jwm775@unhd.unh.edu               | for UNH.  They, in turn, better
(603)868-3416 (I'm never home)    | not speak for me!
---------------------------------------------------------------------
Technical Details
Message-ID: <1990Oct11.033955.3385@uunet!unhd>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!unhd!jwm775

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!unhd!jwm775
From: jwm775@uunet!unhd (Jonathan W Miner)
Newsgroups: comp.os.msdos.programmer
Subject: Modems and Turbo C
Message-ID: <1990Oct11.033955.3385@uunet!unhd>
Date: 11 Oct 90 03:39:55 GMT
Reply-To: jwm775@unhd.UUCP (Jonathan W Miner)
Organization: Computing Information Services, University of New Hampshire
Lines: 23