Send commands to the HMP using a Telnet client

From SpinetiX Support Wiki

Jump to: navigation, search

This page is related to Shared Variables.

Introduction

Telnet is a network protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented communication facility over TCP (the port used is usually 23, though in our case, it's typically 1234) using a virtual terminal connection. You can use different Telnet clients (e.g., Microsoft Telnet Client, PuTTY, Tera Term etc.) to connect to an HMP over the network and send commands using the TCP interface exposed by the Shared Variables legacy server.

Note Note:
The HMP doesn't implement the Telnet protocol (a "raw" TCP socket connection is done instead), therefore it will not send any feedback regarding the success of establishing a connection or the result of a command. Nevertheless, most Telnet clients will transparently switch to a raw TCP socket connection in such cases, even though a Telnet one was selected.

Tutorial

Steps

  1. Open HMP Control CenterAdvanced Applications → Network API page.
  2. Click on the checkbox labeled "Enable secure server" (or "Network API" on older firmware version).
  3. Click on the checkbox labeled "Enable legacy unprotected server"; change the port if needed.
  4. Click the "Apply" button and reboot the player.
  5. Open a connection toward the HMP from your Telnet client. (Instructions for three popular Telnet clients can be found below.)
    • Using PuTTY:
      1. Open the application and enter the host name or IP address of the HMP.
      2. Set the port to 1234 (or to the value set manually)
      3. Set connection type to "Raw" or "Telnet" and press "Open".
    • Using Tera Term:
      1. Open the application and under "Host" field, enter the host name or IP address of the HMP.
      2. Select the Telnet service and set the port to 1234 (or to the value set manually)
      3. Press "OK".
      4. Open Setup > Terminal; under New-line, set both options to "CR+LF", then enable "Local echo" and "Auto switch" options. Press "OK".
    • Using Windows Telnet client:
      1. Press the Windows Start button and run the command: "telnet" (opens the Microsoft Telnet Client).
      2. Type "SET LOCALECHO" and press "Enter". (See more about Telnet commands.)
      3. Type "open HMP_address port"
        HMP_address is the host name or IP address of the HMP and port is 1234 (or the value set manually).
      4. Press "Enter" (If the connection is successful, the cursor will move at the top of the window.)
  6. Type the following commands, one at the time. Make sure to press "Enter" after each command.
SUBSCRIBE "var1"
UPDATE "var1" "some value"
EVENT "mousedown" "x=33,y=44,button=0"
EVENT "mouseup" "x=33,y=44,button=0"
Note Notes:
This page was last modified on 1 February 2023, at 17:16.