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

I've run into a bit of a jam in the middle of a telnet session. I'm using Net:Telnet to connect to a Unix gateway which in turn connect to a device that uses a VT100 terminal. Now - to the point where I hit the device, I can see all the data being passed between the application and the remote side in my dump_log file - however, from the point where the connection to the VT100 terminal is made, No characters turn up. Now I know that its not something to do with a prompt setting, because all my commands in the secion subsequent to the second telnet session go through without erroring out - - - and I can see all data being exchanged after closing the VT100 connection. Is there a way or means to configure Net:Telnet to deal with VT100? If not, is there any way to deal with this issue?
I'll really appreciate any nudges in the right direction. Thanks in advance!
/Gridlock a.k.a. Debashis "Codito Ergo Sum"

Replies are listed 'Best First'.
Re: Net::Telnet and VT100 Term Types
by matija (Priest) on Mar 03, 2004 at 08:41 UTC
    I'm not entirely clear on what you're trying to do. Let me see if I can understand this correctly: you script connects to a gateway. A VT100 is also connected to this gateway. Your script sends a command to the gateway to connect you to the VT100 - and here the trouble starts. Correct so far? Assuming the above, the fact that you say that you see the traffic after the connection is closed makes me think you are Suffering from Buffering. Possibly not on your side, but on the gateway.

    On the other hand, it could be that you are connected to the VT100, but nobody is typing anything. After all, a VT100 is just a terminal, not an active device.

    Also: are you using Net::Telnet::cmd to send your communications to the VT100? If you are, you may be having a problem with a mis-set prompt, or line separator.

    Try using Net::Telnet::get or Net::Telnet::getline (both with a timeout set), to see if you get any data that way.

    And if it's none of the above, show us some code. It might give us a better idea of what you're trying to do.

      Matija You understood me correctly! Thanks for the tip - I think I found where I've run into issues. Appreciate it!
      /Gridlock a.k.a. Debashis "Codito Ergo Sum"
Re: Net::Telnet and VT100 Term Types
by castaway (Parson) on Mar 03, 2004 at 07:49 UTC
    Can you show some example code? What do you mean by 'deal with VT100'? Maybe you just need to set TERM=vt100 somewhere? You say you see nothing in the log, but do the actual commands to/from the vt100 device work?

    Net::Telnet itself certainly shouldnt care what data its actually passing, although its a 7-bit protocol by default. (You can set 8-bit using the binary option, but it'll pass anything just as happily without)

    C.