Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MODEM INTERFACE

Posted on 1998-08-14
6
Medium Priority
?
346 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
Industry Leaders: 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 300 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

Industry Leaders: 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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

721 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