Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl Telnet client not receiving all the data

by ig (Vicar)
on Oct 25, 2013 at 21:01 UTC ( [id://1059754]=note: print w/replies, xml ) Need Help??


in reply to Perl Telnet client not receiving all the data

It looks to me like the server is sending a VT100 query device code command to the 'terminal' (your telnet client, when you run your script). It is probably then waiting to receive your device code. Since you don't send your device code, it doesn't continue to send the menu and prompt.

You probably have a timeout because your script is waiting for the server to send data and the server is waiting for your script to send data. It's good that at least one of them timeout.

You should read up on VT100 terminal. The first source I found with the 'query device code' sequence was http://www.termsys.demon.co.uk/vtansi.htm, but there are many.

  • Comment on Re: Perl Telnet client not receiving all the data

Replies are listed 'Best First'.
Re^2: Perl Telnet client not receiving all the data
by jicjoc (Initiate) on Oct 25, 2013 at 23:01 UTC
    Thank you guys for the help Changing my prompt to a variant of *option* wont help as i am not receiving that data. The suggestion re VT100 sounds most promising. I dont fully understand it, but this is exactly whats happening. my telnet client just sits there waiting for some data. It could be this. I'll invetigate! Thank you Any more experts on VT100, and whether this could be the problem?
Re^2: Perl Telnet client not receiving all the data
by oiskuu (Hermit) on Oct 26, 2013 at 18:02 UTC
    Well spotted! Net::Telnet suggests:
    Usually you want the remote TERM environment variable to be set to something like "dumb" so you don't read escape sequences meant to be interpreted by a display terminal.
    However, here the server requests neither terminal type, nor environment variables, but sends a "\033Z" to query terminal device attributes. A good response to this might be "\033[?6c" ('I am a vt102').

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1059754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found