I'm trying to create a bridge between TCP server and a client connected thorough a serial port using socat.
I emulate my TCP server with the following command
socat tcp-listen:8888,reuseaddr -
I emulate the serial device with a pty. To create a simple brigde with the following command:
socat -d -d TCP:localhost:8888 pty,rawer
This works fine but, I want to log the contents of the messages between the two devices.
I have tried to do this with the following command:
socat -d -d TCP:localhost:8888 SYSTEM:'tee server.log | socat -d -d - pty | tee client.log'
This seems to work fine but my problem is that I get an echo on the server side.