By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

Serial Port in shared mode !!

P: n/a
Hi All

I have two programs ; both of them I need to give read/write access to the
same Comm Port.

How can I do so; using Code or third party tool/library
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
kd
Hi Essam,

When you have two programs that read/write to the same port, the most
important thing to take care is, that, the port should be closed by one
program after use, so that it is is available to be opened by the second
program.

kd.

"Essam" wrote:
Hi All

I have two programs ; both of them I need to give read/write access to the
same Comm Port.

How can I do so; using Code or third party tool/library

Nov 21 '05 #2

P: n/a
Hi,

For the most part, this may not be practical. There are commercial products
that do this, by creating a virtual device driver that permits some forms of
sharing (Eltima and Franson are keywords that you can use to search Google).

Also, I have a VB code example in my book (see below) for serial port
sharing. However, it requires that you have control of all code that is
sharing the port, and that you write your code with an understanding of the
limitations of such sharing.

If you tell me more about what you really need, I may be able to offer some
more specific suggestions.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
Nov 21 '05 #3

P: n/a
Hi Dick

Thanks for your information

I own your book (but the 2nd Edition) ; I will describe what I want and hope
to have your advice

I have a data logger with customized software for data retrieval via RS232;
I want to use 2 modems to be able to download the data remotely.

The customized software is hard coded to use COM-1 and there is no way to
have a version of it that can use a modem instead of direct connection to
serial port.

So; I want to have a small application that can open COM-1 in shared mode
and issue AT-Commands to the modem to establish the connection with the
remote Data Logger, and after the success of connection I can run the
original data logger software ; which will not notice the modem and be fooled
that the data logger is connected directly on the Port

Sorry for this long story ... But what do you think
Or if there is other ways

I tried Eltima Shared Serial Ports … but I have some problems with it .

Thanks in advance

Essam
"Dick Grier" wrote:
Hi,

For the most part, this may not be practical. There are commercial products
that do this, by creating a virtual device driver that permits some forms of
sharing (Eltima and Franson are keywords that you can use to search Google).

Also, I have a VB code example in my book (see below) for serial port
sharing. However, it requires that you have control of all code that is
sharing the port, and that you write your code with an understanding of the
limitations of such sharing.

If you tell me more about what you really need, I may be able to offer some
more specific suggestions.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.