I have a hardware platform that only have one serial port (COM1, a RS232 port) available, but I need to connect to two devices. The following diagram shows how A and application B want to talk to device Ad and device Bd respectively (over the single COM port).
App A---- | |---- COM1A------ Device Ad COM1---- SPLITTER---- | |---- COM1B------ Device Bd App B----
So, I though of creating a small splitter device that would know how to split and combine data and send it to the right port. Meaning, data from AppA would end up on COM1A for device Ad and data from AppB would end up on COM1B for device Bd.
I thought that to accomplish this I could prefix something to the message sent from each application which would act like a routing signal and the splitter would then look at it and send the message (minus the prefix) to the right port. Similarly, for data arriving over one of the split port, the splitter would add the prefix and send it back to the host, where it would again be looked at and routed to the correct application.
I hope this was clear and not confusing!
So...... my question is, is this a good way to accomplish this? Are their devices that do it? I did find references to "serial port splitters" but they were all for PC environment and all my devices are embedded boxes.
Thanks for your inputs!