commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [Net] Disable echo when using TelnetClient
Date Mon, 27 Jun 2011 21:49:27 GMT
On 27 June 2011 18:34, Mark Eherts <markeherts@gmail.com> wrote:
> Hello all,
>
> Using the reference link below, I've been trying to issue commands to my
> router via the TelnetClient class, but I've run into some trouble. Namely,
> that whenever I issue a command, the response I read contains an echo of the
> command I issued. For instance, if I issue an 'ls' command, the response I
> read back is prefaced with the following character sequence: " [mls". Is
> there a way to disable echoing? If there is, it's not made apparent.

Try using

http://commons.apache.org/net/api-3.0.1/org/apache/commons/net/telnet/TelnetClient.html#addOptionHandler%28org.apache.commons.net.telnet.TelnetOptionHandler%29

to add the handler:

http://commons.apache.org/net/api-3.0.1/org/apache/commons/net/telnet/EchoOptionHandler.html#EchoOptionHandler%28boolean,%20boolean,%20boolean,%20boolean%29

> Can anyone help?
>
> Regards,
> Mark
>
> Reference:
> http://twit88.com/blog/2007/12/22/java-writing-an-automated-telnet-client/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message