Hi Yamanaka,

Thanks for your quick response  .

Well, Please  look in to my code that handles the shell connection and my
debug info at the point of  reading and writing data in  channel .

try {
            channel_ = (ChannelShell)session_.openChannel("shell");
            channel_.setPty(true);
            channel_.setPtyType("vt100")
            channel_.connect(1000);

            we set  the terminal mode as :
           // These values were taken from a debug openssh session, compiled
with
            // -DPACKET_DEBUG and run with the -vvv option.  Mnemonic codes
are from
            // RFC 4254 -- http://www.rfc-archive.org/getrfc.php?rfc=4254

        } catch( JSchException ex ) {

        }

// Reading and writing data

try {
            InputStream in_ = channel_.getInputStream();
            OutputStream out_ = channel_.getOutputStream();
        } catch( java.io.IOException ioe ) {
           //
        }

// Writing data to channel
When a key stroke is presses , say example UP Arrow Key
( Key Pressed code : 38 ) , its  code is generated and written in to the O/P
Stream in the from of bytes.
Flushes the data to the channels O/P Stream

KetStroke --> channels O/P Stream  --> Remote Shell

// Reading data from channel
The response data in bytes is taken from the I/P Stream and processed to
VT100 Emulator Screen.

VT100 Emulator Screen <-- channels I/P Stream   <-- Remote Shell

ISSUE :

For UP Arrow key , response data taken from I/P Stream is normal when i
connect to a remote shell .

For UP Arrow key , response data  taken from I/P Stream is abnormal when i
connect to a Galaxy Service Processor  . I always get the value "A" rather
than the  exact  data .

Note :
1. I tried vt102 , also ends with the same issue


The above code and debug information might have given you the clear
visibility of the issue .

Awaiting your reply .

Thanks,
S E N TH I L





On Wed, Dec 17, 2008 at 6:33 AM, Atsuhiko Yamanaka <y...@jcraft.com> wrote:

> Hi,
>
>   +-From: "Deivanayagam Senthil" <deivasent...@gmail.com> --
>   |_Date: Tue, 16 Dec 2008 23:54:24 +0530 __________________
>    |
>   |We have an application that is implemented with  *JSCH 0.1.33 *and  VT
> 100
>   |model Emulator screen that connects to a remote machine .
>   |*Issue with Arrow key:
>    ...
>
> IMHO, this is not a problem from JSch API, but from the terminal emulation.
> How about setting your favorite terminal type?
> Please refer to Shell.java[1];
>
>  Channel channel=session.openChannel("shell");
>  ...
>
>  ((ChannelShell)channel).setPtyType("vt102");
>  channel.connect();
>
> By the default, "vt100" has been chosen.
>
> [1] http://www.jcraft.com/jsch/examples/Shell.java
>
>
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
>    +1-415-578-3454
> Fax +81-22-224-8773
> Skype callto://jcraft/
>



-- 
DEFEAT THE DEFEAT
          BEFORE
THE DEFEAT DEFEATS YOU

R.Deivanayagam Senthil
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to