Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Perl::Expect - DataTrack Escape Sequence

by set_uk (Pilgrim)
on Oct 30, 2003 at 17:27 UTC ( [id://303337]=perlquestion: print w/replies, xml ) Need Help??

set_uk has asked for the wisdom of the Perl Monks concerning the following question:

I hoping that someone else has had the same problem here.

I have written a script to connect via Perl::Expect using telnet to a Data Track device which is connected to a Meridian voice switch.

The escape sequence to leave the voice session and reenter the Data Track menu is ~@ (tilde followed by an at sign). Works interactively manually - but I cant get it to work via Perl Expect.

Previous problems I have had when sending these type of disconnect signals to other devices is that a trailing carriage return causes the sequence not to be interpreted correctly. This is not the case here.

I have tried:-

$self->{_exp}->send("$RespCmd"); Where $RespCmd = ~@ or '\x7E\x40' or '\176\100'
Anyone have an idea as to how to identify what might be the issue. I'm told the tracker uses tip for terminal emulation.

Replies are listed 'Best First'.
Re: Perl::Expect - DataTrack Escape Sequence
by sgifford (Prior) on Oct 30, 2003 at 20:10 UTC
    If I were trying to solve this, I would use strace(1) or truss(1) to see what tip is reading when it works and when it doesn't, and figure out how it's different between the two. Maybe it requires a short pause between the two, or requires them to be in two different read statements, or something; see what pattern of reads you get when it works, then dink with your program until you can get it to do the same thing.
      I need some help on that one. I know how to truss a process which doesn't require input - but for the manual trace where I can disconnect how do I set that truss up to trace and allow me to enter input?
        Start it up in one window, get the PID, and then use truss -fp in another window.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://303337]
Approved by snax
Front-paged by mandog
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-25 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found