Solved

modem question

Posted on 1998-12-07
14
225 Views
Last Modified: 2010-04-15
How do I initialize a modem, recognize dial tone and finally
dial a number?
0
Comment
Question by:sasson
  • 5
  • 5
  • 3
  • +1
14 Comments
 
LVL 10

Expert Comment

by:rbr
ID: 1254916
Which modem. Normaly use can use the Hayes-commands. Look at your manual.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1254917
Wht is OS: Dos/Windows?
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1254918
What is OS: Dos/Windows?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sasson
ID: 1254919
I Use C Language. How do I approach the port?  Recognize a dial tone.....
0
 
LVL 10

Expert Comment

by:rbr
ID: 1254920
Which OS, which modem?
0
 

Author Comment

by:sasson
ID: 1254921
OS=Win95
Modem = regular analog modem
0
 
LVL 10

Expert Comment

by:rbr
ID: 1254922
Is your modem HAYES compatible?
0
 

Author Comment

by:sasson
ID: 1254923
Yes. It is.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1254924
Write you EMail , i can send you example programm
read/write  of Modem
0
 

Author Comment

by:sasson
ID: 1254925
My email is elisa@orckit.com

Thanks in advance

Eli
0
 
LVL 2

Expert Comment

by:Ready4Dis
ID: 1254926
Look up bioscom in your help file, it gives you everything you need to make a simple modem program...

#include <bios.h>
#include <conio.h>
#include <iostream.h>

#define COM1       0
#define COM2       1
#define COM3       2
#define COM4       3
#define DATA_READY 0x100
#define TRUE       1
#define FALSE      0

#define SETTINGS ( 0xE0 | 0x02 | 0x00 | 0x00)

void put_one(char t)
{
      bioscom(1,t,COM1);
}

void put_line(char line*)
{
      int ctr;
      for (ctr=0;ctr<sizeof(line);ctr++)
            put_one(line[ctr]);
      put_one(13);
}

int main(void)
{
       int in, out, status, DONE = FALSE;
       char *number;
       bioscom(0, SETTINGS, COM1);
       cout << "What is the number:";
       cin >> number;
       put_line("+++");
       put_one('A');
       put_one('T');
       put_one('D');
       put_one('T');
       put_line(number);
       while (!DONE)
       {
                  status = bioscom(3, 0, COM1);
                  if (status & DATA_READY)
                         if ((out = bioscom(2, 0, COM1) & 0x7F) != 0)
                                    putch(out);
                         if (kbhit())
                         {
                                    if ((in = getch()) == 27)
                                           DONE = TRUE;
                                    bioscom(1, in, COM1);
         }
       }
       put_line("+++");
       put_one('A');
       put_one('T');
       put_one('H');
       return 0;
}
0
 

Author Comment

by:sasson
ID: 1254927
Thanks, but it wasn't what I was looking for.
Besides I got an answer.

regards Eli
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1254928
In this case you must reject this answer.
I my example , that i have send you, OK, i write it as
reply.
Alex

0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 200 total points
ID: 1254929
My example programm with OpenComm,...
Regards, Alex
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
memory leak detection 9 101
reading tzdatabase for timezone definitions 5 151
Handling string inputs in C/Linux 23 195
Why is compiler in oracle server ? 9 96
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question