RS-232 emulation
In order to use the XnTcp interface with layout control programs that support only communications thru the serial port, you need to install on your computer a TCP Serial Port Redirector program.
The RS-232 emulation has been tested on Windows® XP with TrainController from Freiwald Software and with the open source program RocRail, using the following cost free programs:
Program |
Author |
License |
Operating system |
com2tcp |
Vyacheslav
Frolov |
GNU General Public License |
64-bit MS Windows® Windows® 2000 Windows®
XP Windows® Server 2003 |
HW
VSP3 |
HWgroup |
Freeware for personal use |
Windows® 98 Windows® NT Windows® 2000 Windows®
XP Windows® Vista |
Other programs are commercially available, but have not been tested.
On Unix® based systems, the following programs (not tested yet) should provide access to the XnTcp interface through a Pseudo TTY (this solution will unlikely work on Mac OS®/X).
* socat is already included in many Linux® and BSD distributions.
Search the Internet for precompiled versions.
The above programs create a virtual serial port on your computer, connected via TCP/IP to the XnTcp interface. Thru this virtual port, your serial layout control program can connect to the interface.
Instructions
- For the installation of the chosen TCP Serial Port Redirector program, kindly refer to the instructions provided by its author;
- Make sure that the XnTcp interface is
- connected to your computer or to your LAN
- connected to the Command Station or to the XpressNET
bus
- running (red LED blinking)
- accessible with a Web browser as explained in XnTcp settings
- Start your TCP Serial Port Redirector program, specifying
- the IP address of the XnTcp interface (default 10.1.0.1)
- the TCP port number of the XnTcp interface (default
61235)
- and disabling the Network Virtual Terminal (NVT) protocol, sometimes
referred to as Telnet protocol, if present.
If you use com2tcp, install the com0com program and then type into a
command window:
- C:\Program Files\com2tcp-1.3.0.0-386\com2tcp --baud 9600 \\.\CNCB0
10.1.0.1 61235 (assuming you installed com2tcp in "Program
Files"); or
- C:\Program Files\com2tcp-1.3.0.0-386\com2tcp --baud 9600 \\.\CNCB0
XNTCP001 61235 (if the XnTcp interface is connected to the
LAN).
The baud rate is actually irrelevant. Choose a value supported by your
layout control software.
If you use HW VSP3, install the stand-alone version, start it and
configure it as follows:
- Under the Virtual Serial Port tab
- Port Name = choose a serial port not present on your system
(e.g. COM100)
- IP Address = 10.1.0.1 (or the address assigned by DHCP)
- Port = 61235
- External NTV Command Port = OFF
- Under the Settings tab
- Log Enabled = OFF
- Create VSP Port when HW VSP Start-up = OFF
- TCP Server Mode = OFF
- Purge Buffers when Port is Opened = ON
- Connect to Device even if Virtual COM is closed = ON
- NVT Enabled = OFF
- Remote Port Setup = OFF
- Keep Connection = OFF
- Strict Baudrate Emulation = OFF
- Close Inactive Connection = OFF
- Click on Save Settings to INI file
- Return under the Virtual Serial Port tab
- Launch your layout control program and configure it to use the virtual port created by the TCP Serial Port Redirector (CNCA0 for com2tcp and the port chosen during the configuration (e.g. COM100) for HW VSP3) with the protocol for LI100, LI100F or LI101 interfaces (other interface types are not supported).
Windows® is a registered trademark of
Microsoft Corporation
TrainController is a trademark of
Freiwald Software
Unix® is a registered trademark of
The Open Group
Mac OS® is a registered trademark of
Apple Inc.
Linux® is a registered trademark of
Linus Torvalds
XpressNET is a trademark of
Lenz Electronik, Gmbh