commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Kolbus <andrew.kol...@gmail.com>
Subject Help putting TelnetClient into binary mode?
Date Tue, 09 Dec 2014 02:15:48 GMT
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).

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?

Mime
View raw message