Mail Archives: djgpp/1996/12/24/09:33:22
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 -