Solved

Problem interfacing with Sage 935AT through terminal server

Posted on 2003-11-06
7
315 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySQL Web Database 5 111
Passing shell scripts to run on the SFTP cmd object 12 180
Perl Scripting from a shell script with if and for 4 83
Perl script to delete older files 6 73
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…
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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