Message-ID: <32C228F2.6001@post.comstar.ru> Date: Thu, 26 Dec 1996 10:27:46 +0300 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: Comstar Ltd. MIME-Version: 1.0 To: DJGPP Mail List Subject: Re: modem Questions References: <9612241402 DOT AA24727 AT quasar DOT bloomberg DOT com > Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >> 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" ); > ::: Hm, may be it works very well, but i'm sure if you want a good modem programm use one of interupt handler lib. Check DJGPP (or SimTel) site for URL to bcserio.zip. -- Regards, Dim Zegebart, Moscow Russia.