Duplicate or missing 0xFF bytes in the data stream on UDS, xDirect, xPico, XPort-0x, XPress-DR and similar device servers

When sending streaming data to the Ethernet interface of the XPort issuing the command 0xFF, it appears the command must be duplicated to pass to the end device.  However, the receiving end device also responds to the data twice not once. Is this normal behavior? If this is not how can I resolve it?  


In most cases when this issue is encountered it is because one end of the network connection is set up to use telnet protocol and the other end is using a raw TCP socket connection.

Telnet uses "IAC" (Interpret As Command) strings for configuration and control of a telnet session between a telnet client and a telnet server. IAC strings always start with a 0xFF, followed by one or two characters that will be interpreted as a command by a telnet client or server. To send the ASCII value 0xFF, the sent IAC string is 0xFF 0xFF (FF twice).

For instance, if a telnet client is being used to connect to the local port on Lantronix CoBos Device Server (10001 by default), but telnet mode has not been enabled on the device; the result will yield the duplication of the 0xFF when data is sent from the Lantronix device's serial port to the telnet client on the host end.

I.e. when the telnet client sees an FF it will remove it from the data stream and try to interpret the next character as a command, so the FF won't be displayed in the telnet session. If two FFs are sent then the first FF will be removed and the second one displayed.

Going in the other direction the telnet client will automatically convert FF characters coming into the telnet session to FF FF, so it may also be seen as duplicate FF characters on the Lantronix device's serial port.

All this would also apply if telnet mode was enabled on the Lantronix Device but the connection being made was from a raw TCP client, just reversed from above.

The solution is to either use telnet on both ends of the connection or raw TCP on both ends.

These changes to how the port interprets IAC strings can be configured either in the configuration port 9999 or through the Web Manager on the unit.

Configuration via telnet to port 9999

In the Setup Mode on the Lantronix CoBos Device Server, using a telnet connection to port 9999, one can enable telnet mode by setting the Disconn Mode to 40 (or any other value that sets bit 6 in the bit map,) in the channel settings.

Image

Web Manager

If connecting through the web manager, one can enable "Telnet Com Port Cntrl" in the Common Options section of the Channel 1 Connections screen in the Lantronix device's Web GUI.

Image

For more information on accessing a Lantronix device's settings through either Telnet or the Web GUI please consult the appropriate User Guide for the specific device found here: http://www.lantronix.com/resources/product-index/
 



[Originally Published On: 11/02/2007 09:31 AM]