delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/26/02:54:53

Message-ID: <32C228F2.6001@post.comstar.ru>
Date: Thu, 26 Dec 1996 10:27:46 +0300
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: Re: modem Questions
References: <9612241402 DOT AA24727 AT quasar DOT bloomberg DOT com >

>>    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.

- Raw text -


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