Emulate console by sending data on one UDP port, and receive text from another

1

1

I'm trying to establish a “console-like” connection with a National Instruments cRIO-FRC.

It broadcasts its console output onto 255.255.255.255, UDP port 6666. I can listen to it with:

socat UDP-RECV:6666,broadcast,reuseaddr -

It listens to commands on its IP address, UDP port 6668. I can send commands with:

socat - UDP-DATAGRAM:10.8.54.2:6668,broadcast,reuslsddr

However, these 2 commands run in separate terminals; i.e. I have to type into one, and view results in another window. Is there a way to concurrently run these two programs? Or is there a more appropriate program to use other than socat?

Alexander - Reinstate Monica

Posted 2014-10-11T19:53:39.370

Reputation: 283

Answers

0

Ampersand?

socat UDP-RECV:6666,broadcast,reuseaddr - &
socat - UDP-DATAGRAM:10.8.54.2:6668,broadcast,reuslsddr

Maximus

Posted 2014-10-11T19:53:39.370

Reputation: 19 395

I thought so too, but it doesn't work. If I do just socat UDP-RECV:6666,broadcast,reuseaddr - &, and call commands from another terminal, the output shows fine. However, the moment I do another comand on that first, e.g. ls, I get "[1]+ Stopped socat UDP-RECV:6666,broadcast -" – Alexander - Reinstate Monica – 2014-10-11T22:11:57.487

Needs a socat patch? – Maximus – 2014-10-12T06:27:12.790

What do you mean? – Alexander - Reinstate Monica – 2014-10-12T15:44:26.147

Seems like socat application "reuses" udp port opened in one terminal. So starting new socat instance in the same terminal causes the closing of the first established connection. Thought you need to contact socat's authors and report the issue. – Maximus – 2014-10-12T18:42:34.203