modem commands

Posted on 1998-01-14
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.
Question by:isilver
  • 2

Expert Comment

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

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;
  assing(t,'COMx');  {whatever COM port your modem's on}



Give that a shot and let me know what happens.

Accepted Solution

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.
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.

Expert Comment

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.


Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi - What Does "F" Symbolize? 2 475
Consuming Server Sent Event (DOM events) in Delphi 1 770
FMXGrid getting check box state 5 518
ADO Memory leak with DELPHI 2007 37 181
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
This problem is more common than not and I will show you some things to check to solve this problem.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

809 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