Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

MODEM INTERFACE

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
etep
Asked:
etep
1 Solution
 
snoeglerCommented:
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
 
etepAuthor Commented:
Edited text of question
0
 
snoeglerCommented:
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!

 
newexpertCommented:
* 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
 
etepAuthor Commented:
This zip archive only describe the new TAPI functions. Have you already use the TAPI functions? Where can I find sample or example?
0
 
ForgeCommented:
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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now