NPort W2150A-W4/W2250A-W4 Series User Manual
39
Linux Real TTY Drivers
Real TTY driver are provided that will map Linux host TTY ports to NPort serial ports. Once the mapping has
been set up, Linux users and applications can connect to a serial port as if it were a local TTY port. These
drivers have been designed and tested for most Linux distributions, including Linux kernel version 2.4.x,
2.6.x, and 3.x, 4.x. Please check
http://www.moxa.com
for the latest Linux kernel supported.
Basic Steps
Follow these instructions to map a TTY port to an NPort serial port:
1.
Install the NPort device server and set the target device port to Real COM mode.
2.
Install the Real TTY driver files on the Linux host.
3.
Map the host’s TTY port to the target device port on the NPort.
Installing Linux Real TTY Driver Files
Before proceeding with the software installation, make sure you have completed the NPort device server has
been installed and configured correctly. Note that the default LAN IP address for the NPort is
192.168.126.254
, whereas the default WLAN IP address is
192.168.127.254
.
ATTENTION
The target serial port must operate in Real COM mode in order to map TTY ports.
1.
Get the driver file from
https://www.moxa.com/support/support_home.aspx?isSearchShow=1
.
2.
Log in to the console as a super user (root).
3.
Execute
cd /
to go to the root directory.
4.
Copy the driver file
npreal2xx.tgz
to the / directory.
5.
Execute
tar xvfz npreal2xx.tgz
to extract all files into the system.
6.
Execute /tmp/moxa/mxinst. (For Red Hat AS/ES/WS and Fedora Core1, execute
“# /tmp/moxa/mxinst SP1”
.) The shell script will install the driver files automatically.
7.
After installing the driver, you will see several files in the
/usr/lib/npreal2/driver
folder:
mxaddsvr
(add server, map TTY port)
mxdelsvr
(delete server, undo TTY port mapping)
mxloadsvr
(reload server)
mxmknod
(create device node/TTY port)
mxrmnod
(remove device node/TTY port)
mxuninst
(remove TTYport and
Enter the new IP address and netmask. If multiple units
were selected, you mayMapping TTY Ports
Make sure that you set the operation mode of the desired NPort serial port to Real COM mode. After logging
in as a super user, enter the directory
/usr/lib/npreal2/driver
and then execute
mxaddsvr
to map the
target NPort serial port to the host TTY ports. The syntax of
mxaddsvr
is as follows:
mxaddsvr
[
NPort IP Address
] [
Total Ports
] ([
Data port
] [
Cmd port
])
The
mxaddsvr
command performs the following actions:
1.
Change npreal2d.cf.
2.
Create TTY ports in directory /dev with major and minor number configured in npreal2d.cf.
3.
Restart the driver.