WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Serial
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Getting around COM Port in Use

Keywords:   comport  serial connector

Question:

I have a program that was written by someone else that monitors the com port for signals from a piece of equipment. It looks for a switch that shorts pins 4 and 6 on a 9 pin serial connector. I want to be able to "fake" that short. I've used the serial extender to open and work with the comport which works fine by itself, but gives me an error if the other program is running. Any suggestions?

Answer:

In general, only one program can use the comport at a time. In theory the Serial Extender might be able to detect when those pins are shorted - it might affect normal serial operation though.

With enough time and money, the other program could be patched to check some other condition and not the real com port.

It all depends on exactly what you are trying to accomplish.

Related Question:

I would like to write a batch file to monitor the Modem so I can automatically diconnect (hangup) after a certain length of time. I am trying to use the SERIAL EXTENDER to do this. However, the pComOpen command always failed, I assumed because the COM port is already used by DUN.

Would anyone know of a simple way to time out the Modem/Phone connection ? My kids (and I as well) sometime got on the internet or other dial up services and forgot to disconnect and tied up the phone line for hours !!!

Answer:

  1. The DUN and the serial extenders are indeed incompatible.

  2. I like the idea of simply letting Windows take care of it by looking around in the modem configuration settings or the Control anel Internet settings.

    Check your modem settings and, under the connection tab there should be a check box for disconnect idle time, that would be if there is no activity for xx min, hang up the phone.


Article ID:   W12567
Filename:   Comport Being Accessed by More than one Program.txt
File Created: 1999:04:15:16:48:06
Last Updated: 1999:04:15:16:48:06