Re: modem programming
From: fred smith (fredex_at_fcshome.stoneham.ma.us)
Date: 09/29/03
- Previous message: Reuben D. Budiardja: "Re: Remote Keyboard and mouse"
- In reply to: Srinivas S: "modem programming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: redhat-list@redhat.com Date: Sun, 28 Sep 2003 18:06:22 -0400
On Sun, Sep 28, 2003 at 10:27:15AM -0700, Srinivas S wrote:
> Hello,
>
> I want to program my external modem for communication. If
> anyone could tell me how i could go abt it or send a sample program in
> C/C++, how to program an external modem on a serial port, to initialize
> it and dial a number, it would be of great help.
Srinivas:
You've got two related but different issues here.
The first is how do control the serial port from a C or C++ program,
the second is how to control the modem.
The first is pretty much like any Unix system. There is a HOWTO for
serial programming on Linux, I suggest you look at the HOWTO documents
on your distribution, or check out the LDP (Linux Documentation Project)
for their HOWTO pages.
Regarding programming the modem, you need to know its commandset and
the responses it sends, so you can (having written the lower-layer
code to handle the serial port) then send it the desired commands
and parse its responses for correctness. Unfortunately, every modem,
even those that proclaim "Hayes Compatible" has its own slightly
incompatible set of commands, so you need the correct documentation
for the exact modem you have, or the one you intend as your program's
target.
Fred
--
---- Fred Smith -- fredex@fcshome.stoneham.ma.us -----------------------------
"And he will be called Wonderful Counselor, Mighty God, Everlasting Father,
Prince of Peace. Of the increase of his government there will be no end. He
will reign on David's throne and over his kingdom, establishing and upholding
it with justice and righteousness from that time on and forever."
------------------------------- Isaiah 9:7 (niv) ------------------------------
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
- application/pgp-signature attachment: stored
- Previous message: Reuben D. Budiardja: "Re: Remote Keyboard and mouse"
- In reply to: Srinivas S: "modem programming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|