0

I want to connect two serial port into one serial port. Suppose there are three system A,B and C.

enter image description here

A,B and C are connected each other using serial communication (RS232 port) like star connection. So, here is the situation. When system C send data to system A and system B, it will send to both system. But when system A or system B send data it is not received by system C.

So I want to know how to communicate with serial port device to other serial port device (multiple device).

1

5 Answers 5

3

Yes, this can absolutely work, at least with certain restrictions / under well defined voltage conditions.

  • keep your wiring for C:TX --> A:RX and B:RX

  • for the other direction, combine the A+B TX data to one signal for the C:RX pin, by using a "half-duplex" wiring scheme with a diode and a resistor, as for example shown in Lammert Bies' circuit for Half duplex RS232 spy / monitor / sniffer cable or in this Spy Cable circuit. Both variants should work ok IMHO, if A and B are well with in the RS232 voltage specs.

  • Limitation: A and B cannot send data at the same time, i.e. "Half-duplex" only. If A and B send at the same time, you will receive undefined/garbage data.

Btw, there are even other Stackoverflow posts that confirm this works. Check the second answer there that received two upvotes.

1
  • the diode/resistor solution is documented and in use, even in industry grade devices like this: bb-elec.com/Products/Serial-Connectivity/… . Of course, if you have a general aversion against electronics, resp. diodes/resistors, and consider them dodgy like barny - maybe stay away from the whole RS232/RS422/RS485 area altogether. Commented Oct 26, 2016 at 23:30
2

This simply cannot work. You would have to connect two TX lines together to one RX line, but RS-232 (unlike e.g. Ethernet) is not a shared-medium protocol and cannot detect TX collisions (when two devices try to talk at the same time).

You need to implement a device in the middle that forwards what it receives to the other devices. Even then, it would have to know the protocol the other devices are speaking to prevent interrupted messages (e.g. only stopping at newline characters).

1

you can use "Virtual Serial Port Driver" . this app do you want.

0

You could connect them in a ring: Atx->Brx,Btx->Crx, Crtx->Arx and then each device has to forward messages not for it. This wouldn't require any dodgy diody/resistory hokum pokum.

A big benefit of this approach is that it doesn't place any restrictions on the nodes not to communicate simultaneously :-)

0

In this configuration it cannot work because serial communication (RS232) can provide a communication between two devices and not more!

      TX| -> |RX
device1 |  - | device2
      RX| <- |TX

To solve this problem you must use other protocol as RS485 or other.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.