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 <[email protected]> wrote:

> On 9 December 2014 at 02:15, Andrew Kolbus <[email protected]>
> 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: [email protected]
> > For additional commands, e-mail: [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to