Solved

modem commands

Posted on 1998-01-14
3
249 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do you invoke TCharHelper 1 2,029
Delphi: Read a array of strings in a OleVariant 4 1,259
Delphi XE 5 - windows 3 889
Newbie Thread Programming 1 177
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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