I am building an embedded device which has IR communication with PC and it will have two IR Led/detector pairs which are one-way and are setup like this: IR source input commands -> near embedded device located detector for receiving commands, IR source near embedded for monitoring output -> detector near output for external device to get monitoring data.
I found that the simplest method to implement in hardware is to have separate one-way serial communication ports for each IR/detector pair: first for sending commands, second for monitoring output.
In my Linux PC box I have these two separate serial ports listed as, say /dev/ttyUSB1
and /dev/ttyUSB2
.
What I want is to have one ttyUSB act as an input, other as output, but be able to access both with terminal as single two-way port.
Virtual device solution on /dev/
should be enough, but is not must, the possibility to make program like minicom (or its substitute) to react on two separate ports without any new virtual devices would suffice.
The problem is only on PC side and I think should be solved in software: if there is no solution to this problem I will probably add some custom hardware multiplexing/buffering to make single communication port from these two.
Edit: I added (rather rough draft) image for better illustration where is my problem: