LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communications via a modem

Does anyone know how I could communicate (send and receive serial data) with another computer via the phone lines? I can write both the client and server apps to be run on each end, but how do I:
1) get a connection via modems made?
2) read/write the data to the modem? (does it look like a serial port?)
Thanks
0 Kudos
Message 1 of 2
(2,699 Views)
This should be fairly straightforward, especially if all you want to do is dial the modem, send data and then hang up.

It has been quite a while since I have done anything like this so I am a bit rusty but here are the basics:

First, you communicate with most modems through a COM port. The configuration of the COM port is dependent on the modem you are using. With external modems, the baud rate of the COM port does not necessarily reflect that of the telephone link while with internal modems, it does. Since all of this is modem and protocol dependent, you will have to dig through your modem documentation to figure out what is appropriate.

Next, you need the modem command set. Most modems out there understand some dialect of the Hayes modem command set, that has been pretty standard for a long time. Upon powering up the modem, you will send a command string to initialize it.

Part of that initialization will be to instruct the modem to answer incoming calls at one end of the link (if calls are always originated by the same station) or at both ends if calls may originate in either direction. The rest of what you need to do is dependent on the actual modem and its individual needs.

To start a link, you would instruct the originating modem to dial the other end. When the modem at the other end answers it will negotiate for best speed. Once the link is established, both modems will exit command mode and go into data mode. You can transmit whatever data you need in whatever format you want until you are ready to hang up. When you want to hang up, you will need to send the modem escape sequence to enter command mode and then instruct it to terminate the connection.

You will need to implement a COM callback on the incoming machine(s) to monitor the modem link and answer when it detects a ring signal. The originating end does not need such a callback unless it is also capable of receiving calls. If the link can originate in either direction, simply suspend the COM callback on the originating machine when you place a call.

I hope that will get you started, it's not hard to do at all. You can use Hyperterminal or a similar program to experiment with the command set manually to see just how easy it really is.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 2
(2,680 Views)