Sending a command to a device that requires a login

This article applies to Cinema on a Series 4 only! This works on the Series 4 version of Cinema because connections to the device are not closed until the macro has been completed. The series 3 version connects, sends, and disconnects for each action.

The issue

Sometimes you need to send a command to a device that requires a login.  You may be able to accomplish this in one send action.  If you can, great.  But sometimes you can’t.  Why might that not work?  It depends on how the receiving device handles the login.

Let’s take a look at what might be happening if you send the login and data all at once.  For this example, we will use \n as a termination string

admin\n1234\njrmon -x cp1=1000\n

So if this does not work, the issue might be that the receiving device consumes the username and prompts the user for the password. When the prompt is issued the receiving device may clear the input buffer thus ignoring the remainder of what was sent after the username in our example.

Resolution

To handle this we need to send the username, password, and data separately and with a delay between them. We do not know how long we need to delay but Cinema only allows actions to be spaced out in whole-second intervals so we will do that.

First, we need to define our receiving device. Port 23 is used in this example, please use

Next, we need to create three send actions. One for the username, password, and the data.

Troubleshoot

Hopefully, this works to log in and send commands to your device. You can use the netstat sniffer to monitor the traffic to see if the login works. For this example we would execute the following…

netstat -sd 23
By | Updated On July 17, 2024 10:30 am | No Comments | Categories: | Tags:


INTEG Process Group, inc. © 2023

Real-Time
Mon - Fri, 8am - 4pm EST
P: 724-933-9350
PureChat
Always Available
Contact Form
sales@integpg.com
support@integpg.com

@integpg
@jniordev
13452