[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Problem interfacing with Sage 935AT through terminal server

I am trying to establish an interface with the Sage 935AT using Perl.  I wish to issue commands and capture results using a terminal server connection.  When I telnet into the Sage through the terminal server, the normal interface for the Sage is what a colleague calls "cursive".  In other words, the menu is stagnant, but only one line changes depending on the command given.

Here is my script
     use Net::Telnet;
     use Socket;
     $tn = new Net::Telnet ( Telnetmode => 0);
     $tn->open(Host => $IP,
                Port => 2008);
    # send command "H" to start sage interface
    $tn->print("H");
    # get anything printed out to interface
   @sage = $tn->waitfor('/.+/i');
    print "printing sage\n";
    print $sage[1];

Here is the output that I get.

 √☺ √♥ ²↑ ²▼

Thanks,

lormand

0
lormand
Asked:
lormand
  • 3
  • 3
1 Solution
 
ahoffmannCommented:
sounds like the remote systems returns curses commands or alike
Can you please post an example what it looks like without perl
0
 
lormandAuthor Commented:
ahoffmann, thanks for the response.

>>>>>> telnet session via terminal server <<<<<<<<<<<<<

SAGE INSTRUMENTS 935at
________________________________________________________

 FAR PSQM RESPONDER         &#9575;&#9580;     OFF      o    T
          [ J ]   [ K ]   [ L ]   [ ; ]   ORIG  TERM
________________________________________________________
A) TRUNK TYPE
B) DIAL/RING
C) RETURN LOSS
D) SEND TONE
E) MEAS TONE
F) MEAS NOISE
G) OPTIONS

UPPERCASE O) GO OFF HK    ?) HELP  CR) ENTER  SP) CLEAR
Lowercase o) GO ON HK     S) STO   R) RCL     N) RCL NXT

When sending digits:
To send: 0 1 2 3 4 5 6 7 8 9 - KP ST STP ST2P ST3P +/-
   Type: 0 1 2 3 4 5 6 7 8 9 -  *  #  a   b    c    d

>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<

The line that says "FAR PSQM RESPONDER         &#9575;&#9580;     OFF      o    T" is the only line that changes when the user enters an option (A, B, C, O, o, etc)

At this point, I don't know if this is a problem interfacing with the funky sage interface, and/or I don't know how to properly script Perl using terminal servers
0
 
ahoffmannCommented:
ok, as I assumed: the interface positions the cursor on the screen to change the content
can you figure out which TERM setting your remote box expects?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lormandAuthor Commented:
Sage Term settings:
9600
8
none
1
0
 
ahoffmannCommented:
I didn't mean the serial settings, but the terminal type, for example used in a unix' shell environment variable TERM (like vt100, etc.)
0
 
lormandAuthor Commented:
Sorry, the Sage uses vt100.

Thanks for you patients
0
 
jmcgOwnerCommented:
Nothing has happened on this question in more than 8 weeks. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by ahoffman [grade B] (unresolved but on the right path).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now