Moxa Tech Note

Real TTY Driver for NPort

Real TTY Driver for NPort
Moxa Technical Support Teamsupport@moxa.com
This Tech Note applies to NPort device servers. The following models are included:zNPort DE-211
z
NPort DE-311
z
NPort DE-311M
z
NPort 5100 serieszNPort 5200 serieszNPort 5400 serieszNPort 5600 serieszNPort IA5150
z
NPort IA5250
z
NPort 6000 serieszNPort W2150
z
NPort W2150 Plusz
NPort W2250
z
NPort W2250 Plus

What is the Real TTY driver for the NPort?
The Real TTY driver for the NPort allows a Linux PC to treat NPort serial ports aslocal TTY ports. Similar to the Fixed TTY driver for UNIX PCs, a transparent datatunnel is established to the NPort's serial port. However, the Real TTY driver also
supports IO control of the TTY port, such as setting the baudrate, pulling RTS/DTR
high, and checking line status for CTS, DSR, and DCD signals.
Ethernet

PC with TTY(termio) program

SerialNPortCopyright © 2008 Moxa IncDevice

Released on July 17, 2008

About Moxa
Moxa manufactures one of the world’s leading brands of device networking solutions. Products include serialboards, USB-to-serial hubs, media converters, device servers, embedded computers, Ethernet I/O servers,
terminal servers, Modbus gateways, industrial switches, and Ethernet-to-fiber converters. Our products are key
components of many networking applications, including industrial automation, manufacturing, POS, and medical
treatment facilities.

How to Contact Moxa
Tel:1-714-528-6777
Fax: 1-714-528-6778

Web: www.moxa.com
Email: info@moxa.com

This document was produced by the Moxa Technical Writing Center (TWC). Please send your comments orsuggestions about this or other Moxa documents to twc@moxa.com.

Moxa Tech Note

Real TTY Driver for NPort

Installing the Real TTY driver
Before performing the following steps, restore the NPort's default settings byholding the reset button down for 10 seconds.
1.

Turn the NPort on. The Ready LED should turn green.

2.

Make sure that the NPort and the host PC are properly connected to thenetwork.

3.

Modify the NPort's IP address and other IP parameters so that it is in thesame network as your PC. You may also need to modify the host PC's IPconfiguration. Make sure you can ping the NPort from your host PC.
Remember, the IP addresses of the NPort and the PC must be on the same
subnet. If one IP address is modified, you may need to modify the other IPaddress.

4.

Configure the NPort to Real COM mode. Please refer to instructions in the
NPort's Quick Installation Guide or User's Manual.

5.

Log into Linux as a super user (root).

6.

Execute "cd /tmp" to change to the root directory.

7.

Copy the driver file "npreal2xx.tgz" to the " /tmp" directory.

8.

Execute "tar xvfz npreal2xx.tgz" to copy all files into the system.

9.

Execute "/tmp/moxa/mxinst". For Red Hat AS/ES/WS and Fedora Core1,
add an extra argument as follows: "/tmp/moxa/mxinst SP1"

10.

Change to the "/usr/lib/npreal2/driver" directory.

11.

Execute "mxaddsvr" to map TTY ports to NPort serial ports, as follows:/mxaddsvr [NPort IP address] [total ports] ([data port] [command port])
For example:# cd /usr/lib/npreal2/driver# ./mxaddsvr 192.168.127.254 16
In this example, 16 TTY ports, /dev/ttyr00 through /dev/ttyr15, will becreated. All TTY ports are mapped to the NPort at 192.168.127.254. TheTCP data ports are designated from 950 to 965, and the command ports aredesignated from 966 to 981.

Testing Real TTY ports
1.

After installing the Real TTY driver as shown above, enter the following
command to check if a TTY port is available:# sty –a < /dev/ttyp1

2.

If the system responds with some serial parameter(s), the TTY port isavailable and can be accessed by other programs.

Copyright © 2008 Moxa Inc.

Page 2 of 3

Moxa Tech Note

Real TTY Driver for NPortCable Wiring

Copyright © 2008 Moxa Inc.

Page 3 of 3