Telnet

This is a code example for connecting to a device via the Telnet protocol.

Text Controller Setup

Drag in a Text Controller and name it Telnet. Add three Text Boxes named IPAddress, UserName, and Password (see screenshot).

 

Next, copy the Example Code to the Text Controller.

Using the Example

This code is a generic example of connecting to a Telnet device, sending example Telnet setup bits (varies depending on the device, if needed at all) and passing a username and password to start the session. UserPrompt, PassPrompt, LoggedInPrompt, and LoginFailPrompt are device-dependent and will vary depending on the device. How they are defined in this script is just an example.