Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Problem interfacing with Sage 935AT through terminal server

Posted on 2003-11-06
7
329 Views
Last Modified: 2008-02-26
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
Comment
Question by:lormand
  • 3
  • 3
7 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9696927
sounds like the remote systems returns curses commands or alike
Can you please post an example what it looks like without perl
0
 

Author Comment

by:lormand
ID: 9697006
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9697302
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:lormand
ID: 9697512
Sage Term settings:
9600
8
none
1
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 350 total points
ID: 9699622
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
 

Author Comment

by:lormand
ID: 9701158
Sorry, the Sage uses vt100.

Thanks for you patients
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10049593
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question