Solved

modem commands

Posted on 1998-01-14
3
244 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 50 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to load a ClientDataSet in Delphi from a Resource file? 4 1,253
Delphi Skype API 2 1,730
qrdesign delphi 5 pdf 5 414
Thread safe  opinion 7 111
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

22 Experts available now in Live!

Get 1:1 Help Now