Solved

MODEM INTERFACE

Posted on 1998-08-14
6
343 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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!

 
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

623 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