commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Kolbus <andrew.kol...@gmail.com>
Subject Re: Help putting TelnetClient into binary mode?
Date Wed, 10 Dec 2014 05:08:12 GMT
Sebb,
That's what I feared.  The remote device I'm connecting to doesn't add any
of the padding on 0xFF bytes, so it looks like I can't use the
TelnetClient.  Fortunately, for my needs a simple Socket connection should
work fine.

Thanks,
Andrew

On Tue, Dec 9, 2014 at 8:10 AM, sebb <sebbaz@gmail.com> wrote:

> On 9 December 2014 at 02:15, Andrew Kolbus <andrew.kolbus@gmail.com>
> wrote:
> > I am using the TelnetClient from commons-net 3.3 in JDK 8.  When I try to
> > receive xmodem data over a telnet session, some bytes do not make it
> through
> > to my code.
> >
> > Example:
> > The remote device sends this (confirmed using windows network monitor):
> > 01 01 FE [...] C0 00 FF FF FF 00 00 00 00 27 27 00 [...] (133 byte
> > xmodem-crc packet)
> >
> > However, from the telnet client, I get this:
> > 01 01 FE [...] C0 00 FF 00 00 00 27 27 00 [...] (130 bytes total)
> >
> > From what I have read, this is related to NVT.  It looks like it is
> > converting [FF FF] to [FF] (removing one byte), and just outright
> removing
> > [FF 00] (removing another two bytes for a total of three).
>
> Yes, that is what the RFC mandates:
>
> https://tools.ietf.org/html/rfc856#section-5
>
> In binary mode, IAC (FF) is still required to be recognised.
>
> > I tried using telnetClient.addOptionHandler(new
> > SimpleOptionHandler(TelnetOption.BINARY, true, true, true, true));, but
> that
> > did not change the data I received.
> >
> > A sample of the code I used to discover the issue is attached.  Is there
> a
> > way to get the TelnetClient to pass all data through?
>
> No, that would violate the RFC.
>
> https://tools.ietf.org/html/rfc856#section-5
>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message