I have a setup in which one unix program (s51 from a microcontroller simulation package) is a server tied to a specific port. Let's call the port 111.
I also have setup a client on the same computer to receive hexadecimal characters as output from the server as follows:
nc 127.0.0.1 111 | od -tx1 -w16
Now I want to be able to send data back out to the same port without disconnecting anything else from the port.
echo "data" | nc 127.0.0.1 111
and that command just stalls and nothing is sent to the server.
Unfortunately the only IP based option I have with the server is to specify the port number. The IP format is fixed to TCP/IP by the server.
How do I go about reusing the same port and sending data back to the server all in unix without breaking the connection?
So far the closest answer I have to my problem is to get a second computer, Run realterm on it for windows and have it connect to the main computer running the simulator in linux over TCP/IP.
I tried Wine, but realterm inside wine freezes too often.
I tried Telnet but the best it can do with displaying hex is everything down one column, but I'm wanting 30 columns of hex data.
What can I do to solve my problem all in a unix environment without wasting power of a second computer and without having to upgrade any system?