Solved

modem question

Posted on 1998-12-07
14
217 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
Comment Utility
Which modem. Normaly use can use the Hayes-commands. Look at your manual.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
Comment Utility
Wht is OS: Dos/Windows?
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
Comment Utility
What is OS: Dos/Windows?
0
 

Author Comment

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

Expert Comment

by:rbr
Comment Utility
Which OS, which modem?
0
 

Author Comment

by:sasson
Comment Utility
OS=Win95
Modem = regular analog modem
0
 
LVL 10

Expert Comment

by:rbr
Comment Utility
Is your modem HAYES compatible?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:sasson
Comment Utility
Yes. It is.
0
 
LVL 14

Expert Comment

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

Author Comment

by:sasson
Comment Utility
My email is elisa@orckit.com

Thanks in advance

Eli
0
 
LVL 2

Expert Comment

by:Ready4Dis
Comment Utility
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
Comment Utility
Thanks, but it wasn't what I was looking for.
Besides I got an answer.

regards Eli
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
Comment Utility
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
Comment Utility
My example programm with OpenComm,...
Regards, Alex
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now