in reply to Re: Perl HP ilo vsp
in thread Perl HP ilo vsp

Hy, I tried with piping the keystrokes, but it doesn,t help. As I figured ESC+( is \x{27}(
my $escape_seq="\x{27}("; my ($output, $errput) = $kssh->capture2({stdin_data => $escape_seq}, " +vsp"); print "my output is:'$output'\n";
But command just hangs, only killing the process will it terminate. even tried with ^[( same problem.

Replies are listed 'Best First'.
Re^3: Perl HP ilo vsp
by salva (Canon) on May 31, 2012 at 10:25 UTC
    Well, getting this kind of devices to work often involves a considerable amount of trial an error until you find the exact combination of options.

    Try requesting a tty on the remote side:

    my ($output, $errput) = $kssh->capture2({tty => 1, stdin_data => $esca +pe_seq}, "vsp");
    Or adding some carrier returns before the escape sequence.

    Maybe the device will not accept the sequence until it has send some prompt. In that case, you will like to use Expect, or just use open2 to read the data and send the escape sequence when it is done.

    Try also with a timeout and setting the kill_ssh_on_timeout flag.

      Yup, its alot of playing around with...:( Expect dies with errors, even tried to switch to raw mode didnt help.
      tcsetattr: Input/output error
      basically there is traffic, ssh is sending keep alives so timeout is set from server side to 60 seconds, which is to long.. setting timeout on my side doesnt change anything.. its interesting. added \n but didnt help.. I tried with a fork and to create piped filehandels but no information was sent to the main process... I guess hp has a very odd TTY implementation.