Solved

Problem interfacing with Sage 935AT through terminal server

Posted on 2003-11-06
7
347 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
[X]
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
  • 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
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!

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Six Sigma Control Plans

729 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