delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/24/09:33:22

From: kagel AT quasar DOT bloomberg DOT com
Date: Tue, 24 Dec 1996 09:02:26 -0500
Message-Id: <9612241402.AA24727@quasar.bloomberg.com >
To: libolt AT primenet DOT com
Cc: djgpp AT delorie DOT com
In-Reply-To: <32beed8f.9581813@news.primenet.com> (libolt@primenet.com)
Subject: Re: modem Questions
Reply-To: kagel AT dg1 DOT bloomberg DOT com

   Errors-To: postmaster AT ns1
   From: libolt AT primenet DOT com (Mike McLean)
   Newsgroups: comp.os.msdos.djgpp
   Date: 23 Dec 1996 13:39:03 -0700
   Organization: Lightning Bolt Software
   Lines: 2
   X-Posted-By: @207.98.133.107 (libolt)
   X-Newsreader: Forte Free Agent 1.1/32.230
   Dj-Gateway: from newsgroup comp.os.msdos.djgpp
   Content-Type: text
   Content-Length: 98

   how do I set a modem to anwser in DJGPP, so that I can dial into it
   and have it recieve the data?

Try:
	FILE *modem;
	char resp[10];

	modem = fopen( "COM1", "rw" );  /* Assuming your modem is at COM1: */
	fprintf( modem, "ATS0=1\n" );   /* This may be \r rather than \n. */
	fread( resp, 3, 1, modem );
	if (strncmp( resp, "AT", 2 ) == 0)
	    fprintf( stderr, "Modem ready to answer!\n" );
	:::

-- 
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com

A proverb is no proverb to you 'till life has illustrated it.  -- John Keats

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019