473,395 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Serial Port in shared mode !!

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
3 3269
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: The Man With The Harmonica | last post by:
Hi All, What kind of commands can I use to control the serial and parallel port of my pc. I want to use my laptop instead of microcontrollers and write my software in ANSI C to be used for...
3
by: collinm | last post by:
hi i send a command to a led display, the led display is suppose to return me some character i write a string on a serial port void ledDisplayExist() { char msg={'\0', '\0', '\0', '\0',...
6
by: Peter Krikelis | last post by:
Hi All, I am having a problem setting up input mode for serial communications. (Sorry about the long code post). The following code is what I use to set up my comm port.
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
15
by: xkenneth | last post by:
Hi, I'm writing a couple python applications that use the serial port (RS-232) quite extensively. Is there any way I can monitor all activity on the serial port and have it printed as the...
7
by: davetelling | last post by:
I'm a newbie that is still struggling with OOP concepts & how to make things work they way I want. Using Visual C# Express, I have a form in which I added a user control to display a graph, based...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
4
by: Petr Jakes | last post by:
I am trying to save data it is comming from the serial port continually for some period. (expect reading from serial port is 100% not a problem) Following is an example of the code I am trying to...
4
by: cmdolcet69 | last post by:
This code below write a serial command to the com port then read the results and disaplays it into the label1.text property when button1_click event is triggered. I think what is going on is that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.