Helpful tips for using Telnet and TCP in ReAX Core Studio

Telnet Event: Triggered when a matching string is received by the ReAX's telnet server or when a telnet server sends a matching string through an established telnet client connection.

NOTE: If using a Telnet Event, with Telnet encoding enabled, enabling Auto-buffer will cause undesired results.

Server Mode: When checked, ReAX will act as a server and wait for incoming connections from the specified origin host (no port needs to be defined, port 2323 is the listening port). In this case, the client would use port 2323.  When unchecked, ReAX will connect to the specified origin (host:port) and wait for incoming data.

Note: certain RX controllers allow you to change the server port.  On supported controllers, go to the web setup pages > Setup > Event Manager and set the Telnet Server Port.

Keep Connection Alive: When checked, ReAX will attempt to keep the client connection alive by reconnecting to the origin (TCP server) every 60 seconds if the connection is not open. This does not impact server mode.

Auto-buffer: By default, while an event is executing, all triggers are skipped. Let's say you have a variable action in your telnet event that increases variable varX with 5 seconds delay. When the telnet event triggers, the variable action is queued for execution in 5 seconds. Meanwhile if you get additional telnet triggers, those are discarded. So in the end you'll get varX increased once. If "auto buffer" is checked, those additional telnet triggers are buffered. This means that if you get 10 triggers within 5 seconds, then the varX will be increased 10 times, all triggers are executed.

Use Telnet Encoding: When checked, the client connection will be established using negotiation as specified by the Telnet protocol. When unchecked, it will not attempt to negotiate (raw TCP). Keep this box unchecked unless your device specifically requires true Telnet (Biamp devices trequire this checked). This does not apply to the server mode.

Receiving Feedback from Sent Commands:  To receive feedback from a device that you will also be sending commands to, use a Telnet Event and specify the trigger value (Any, Value, or Expression). Also make sure "keep connection alive" is checked.  The trigger data is represented by a reserved variable _g.  For example, you could use _g as the value (with the expression box checked) in a variable action to dump the incoming Telnet/TCP data into a variable.

Additional Notes: 

  1. If multiple Telnet events have the same origin field (for example 192.168.1.100:6000), they will share a single TCP socket.
  2. If a Telnet action has "Output to" field that matches the origin field of an existing Telnet event, then it will reuse the already created TCP socket. For example, a telnet action that outputs to 192.168.1.100:6000, will reuse the socket created for an event that has the same origin.
  3. If no socket exists to handle a Telnet action, then EM will create a new 'temporary' TCP socket, send the data, then close to socket.

Troubleshooting Tips:

If a device is not responding to control commands:

  • Test commands with the Use Telnet Encoding option disabled, if not working, try with the option enabled (Biamp devices require Telnet Encoding enabled, most other devices require it disabled)
  • Try creating a Telnet event with the Keep Connection Alive option checked, which will force the socket to stay open (Audac DSPs require this)
  • With the Telnet event above, you can add a variable action to dump incoming data to a variable which can be displayed on your control GUI for debugging (incoming data is represented by the reserved variable _g).
  • Send the commands to the device from a Telnet/TCP terminal (Putty, Hercules, etc.) to test that the commands are correct
  • Point the destination IP of the Telnet/TCP action in Core Studio to the IP of your computer, and confirm that commands are being received using a TP server (Hercules, etc.)
  • Review the ReAX device logs for any errors