?
Solved

modem commands

Posted on 1998-01-14
3
Medium Priority
?
253 Views
Last Modified: 2010-04-16
I need some modem commands in anyone knows of any.
In particular I need.

how to initialize a modem through turbo pascal.
how to dial a modem through turbo pascal.
how to hang up a modem through turbo pascal.
how to right text over the modem using turbo pascal.
0
Comment
Question by:isilver
  • 2
3 Comments
 
LVL 2

Expert Comment

by:mitchell042997
ID: 1217125
One way you can do this is through interrupts (I assume).  If you can get your hands on a copy of Ralph Brown's Interrupt List, that may help.

I know to initialize a modem, it's
ATZ

ATDT xxx-xxxx, to dial
ATH to hang up
and then you just write to the com port to write out.

You may be able to use the port command if you know the modems port number (COM1 may be something like 0x38F, for example.  I don't know if you can or cannot directly open up a COM port or LPT port in pascal.  Perhaps try something like this, although I doubt it will work:

var t:text;
begin
  assing(t,'COMx');  {whatever COM port your modem's on}
  writeln(t,'ATZ');

...

end;

Give that a shot and let me know what happens.
0
 
LVL 1

Accepted Solution

by:
olas earned 100 total points
ID: 1217126
Given modem-commands are correct but transfering data in
a robust way can not be done by simply writing to ports.
You can, if You are willing to learn about UARTS and
various registers manipulate and transfer data using your own
code. If your software is anything more than just a code snippet for fun, you should consider getting all the information
about how serial I/O is defined by the PC-standard and then
build a unit yourself using several modules of low-level access
to ports that handles connection, transfers, errors and allows
for future changes in configuration.

The alternative that I propose(after using many hours building my own COMM-unit) is:
1. Get a software toolbox for this purpose
2. If your're making a commercial software or if someone is
paying You: check out Asynch tools from Turbopower.
www.turbopower.com
3. If you're just doing it for fun: there are millions of lines
of source code and precompiled units on the net. Many of
them are freeware. Use your favorite searchengine to find:
source pascal.

Really, this is the way to go unless You want to learn all about
UARTS, RS232 and LOTS about error handling.
Good Luck!


PS. You may open devicenames such as LPTs but you can only do
a limited number of things.
0
 
LVL 2

Expert Comment

by:mitchell042997
ID: 1217127
I've got a neat book about error handling.  A lot of math involved (it seems like a lot even to me, an engineering student, who has haid his fair share of math (calc., diff eq, etc.)).

Have fun with it though.  If math is fun for you, error detection and correction is a good place to start.


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Most folks would know the basics of how Dropbox works, so that’s not the purpose of this article. Security is what it’s all about, so here I’ll share how I choose to secure my Dropbox Account and the Data it contains.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month16 days, 8 hours left to enroll

862 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