Solved

Problem interfacing with Sage 935AT through terminal server

Posted on 2003-11-06
7
310 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:lormand
Comment Utility
Sage Term settings:
9600
8
none
1
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 350 total points
Comment Utility
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
Comment Utility
Sorry, the Sage uses vt100.

Thanks for you patients
0
 
LVL 20

Expert Comment

by:jmcg
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now