E
E
Eugene2016-07-21 00:26:28
Python
Eugene, 2016-07-21 00:26:28

Simultaneous access of several programs to the com port, how?

Good afternoon! There is a device manufactured in 2000 that connects to a computer via a com port. The software that comes with the analyzer (device) is morally and technically outdated. We thought about developing our own software with some features that were not originally there.
One of the chips is simultaneous work with different users (rdp clients) and here we are stuck.
How to organize the ability to access the com port simultaneously from several programs?
It is possible to use an interlayer in the form of a driver program, but how to implement it correctly so that there are no conflicts? (No matter how much I searched the Internet, I did not find a single article on writing a driver for a com device, which is not surprising ...)
The only thing that came to mind was writing a windows service to which running copies of programs will access and the service to the device. Is this the only possible option?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Volkov, 2016-07-21
@a_volkov1987

No way. The com port has never been meant to communicate with multiple devices, as there is no arbitration, no address assignment, etc. So while one connected client does not fall off, the second one has nothing to do on the port.
Reading a port with two applications is fine in terms of the port, but writing to a port from multiple applications is a big problem because you can't know if another application is trying to communicate when you're talking on the port with the device. The maximum that can be done is to queue clients when trying to write to the port.

A
Alexey, 2016-07-21
@alsopub

Try google "com port share", there seems to be a porgram for this.
https://www.google.com/#q=com+port+share Like
www.eltima.com/products/serialshare

Shared Serial Ports ensures simultaneous, high-speed, bi-directional and collision-free connection to RS232 serial port for an unlimited number of applications.

A
Armenian Radio, 2016-07-21
@gbg

You need to start by analyzing the analyzer protocol. Look for documentation, or use packet sniffing to find out what is being transmitted there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question