Solved

MODEM INTERFACE

Posted on 1998-08-14
6
339 Views
Last Modified: 2010-04-01
I wish to send files via modem (COM2). I use Visual C++ 5.0 under NT4.0. I know to send chars to RS232. But I don't know how to comunnicate with the modem to compose a phone number to send a file to an other distant machine. How can I use the S registers of the modem, and the AT commnands on a US robotic SPORTSTER MESSAGE plus (33600 x2)
Where can I find TAPI (Telephony API)documentation?
Note: I wish only use C functions and not C++ functions, it isn't a real windows application.
0
Comment
Question by:etep
6 Comments
 
LVL 6

Expert Comment

by:snoegler
ID: 1170268
Take a look into the TAPI documentation (TAPI=Telephony API).
The TAPI contains many functions to access modem capabilities independent of the vendor
of your modem as long as it is installed correctly. For what purpose do you need access
to the 'S' registers?
( To set a value: ATS<number>=<value>,
  To get a value: ATS<number>?  are the usual ways to get/set the 'S' registers )
0
 

Author Comment

by:etep
ID: 1170269
Edited text of question
0
 
LVL 6

Expert Comment

by:snoegler
ID: 1170270
You should not edit the text of the question after someone has posted a comment or answer ...
It makes it hard for other experts to follow what has already been suggested. Just post a
comment with your changes, it is much better to understand.
To your question: The TAPI documentation is provided with your Visual C++ - just search
for TAPI and you'll get the information. You can use it with a 'console application' - i think that
is what you wanted ( or what did you mean with 'it isn't a real windows application'?)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:newexpert
ID: 1170271
* Most modem's AT commands are standardised I think.
* DOS application ran under windows can assume they can "access com port directly".  Windows will route I/O through appropriate VxD. (ie do it as you were in DOS)
* TAPI documentation can also be download from ftp://ftp.microsoft.com/developr/TAPI/tapi14.zip It's a zip archive of a Word Document.

0
 

Author Comment

by:etep
ID: 1170272
This zip archive only describe the new TAPI functions. Have you already use the TAPI functions? Where can I find sample or example?
0
 

Accepted Solution

by:
Forge earned 100 total points
ID: 1170273
You said you had a routine to send chars to the modem (com2).
If the modem is not connected, the chars are interpreted by the modem chip as commands, the AT commands. To connect, send this:
(assuming your send routine is called Send():)
Send(COM2, "ATDT0123456789i\n");
Then it dials that number and tries to connect. THe modem sends back either "CONNECT ..." , "BUSY", "NO DIALTONE" or something.
If you receive a string "RING", that means someone is calling you,
You can then Send(COM2, "ATA"); to answer. And Send(COM2, "+++~~~ATH"); to hang up. And of course, to init the modem: Send(Com2, "ATZ");

That's all the commands you need. If you're connected, all chars you send will be sent to the other side, and not interpreted as commands. If you send "+++" and wait a sec ("~~~" is a delay) then the modem will get back into command mode but stays connected. Then you can send the "ATH" command to hang up.  If you want to get back online, just send ("ATO");

I wrote a BBS that use only these commands..
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

911 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

16 Experts available now in Live!

Get 1:1 Help Now