Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a remote modem a 'COM Port' on your PC 1

Status
Not open for further replies.

MJKASHE

Technical User
Nov 2, 2005
1
0
0
GB
I currently am using some software to program a AC Inverter drive from a com port on my laptop to the port on the drive.
What i want to do is to be able to have the drive in another country and still connect to it, but the software does not allow for remote/modem connections.

What my question is, is there software that allows you to dial a remote modem, and then creates a virtual port on my laptop. So then i can tell the programming software to download on this virtual port, and the data goes straight down the phone line, picked up by the remote modem and is outputted from the modem direct to the drive.

I dont have experiance in modems and any commands avaliable to them, maybe its as easy as typing a few commands in hyper terminal? (i wish)

Thanks for any suggestions

Regards,

Michael King
 
The technology that you need to be looking for is called a "virtual serial port." It allows you to write an application that will directly control a physical com port, and present a virtual com port to the application that is inflexible. Your application will detect the application opening the virtual com port, will open the physical com port, dial the other modem, and upon connection pass control of the now connected serial link to the "dumb" application.

Code:
*******   ********   ********   ********   **********
* COM *<--* Your *<--* Virt *<--* Virt *<--* Source *
*     *-->* App  *-->* Port *-->* Port *-->* App    *
*******   ********   ********   ********   **********
Because com ports are opened exclusively for read/write access, it is difficult to have two applications pass control of a single physical port at any given time. AFAIK there aren't any Windows applications that do this. Some Linux and Unix programs can cooperatively utilize the com port.

The two back-to-back Virtual COM Ports allow you to provide a standard COM port to the Source Application and still intercept every byte going to/from the physical COM port. In your case, you'd just want to control the dialing without passing any connection information to your Source App. Once the connection is established, then you'd simply pass bytes from the physical to the virtual and vice versa.

Take a look at:

There are configuration issues that you will have to be concerned with as well. For instance, your remote modem will need to be configured for a "hard coded" serial interface speed and also to be in quiet mode (Q1) with echo off (E0) so that the incoming "RING" does not elicit a response. This is the most common reason for connecting to a remote modem and then being disconnected before carrier syncs.

Good luck!


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top