User's Manual
NPort W2150A/W2250A Series  Installing and Configuring the Software 
5-20 
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 be able to 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 driver files) 
At this point, you may map the TTY port to the NPort serial port. 
Mapping 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. Modify npreal2d.cf. 
2. Create TTY ports in directory /dev with major and minor number configured in npreal2d.cf. 
3. Restart the driver. 
Mapping TTY ports automatically 
To map TTY ports automatically, you may execute mxaddsvr with just the IP address and number of ports, 
as in the following example: 
# cd /usr/lib/npreal2/driver 
# ./mxaddsvr 192.168.3.4 16 
In this example, 16 TTY ports will be added, all with IP 192.168.3.4, with data ports from 950 to 965 and 
command ports from 966 to 981. 
Mapping TTY ports manually 
To map TTY ports manually, you may execute mxaddsvr and manually specify the data and command 
ports, as in the following example: 
# cd /usr/lib/npreal2/driver 
# ./mxaddsvr 192.168.3.4 16 4001 966 
In this example, 16 TTY ports will be added, all with IP 192.168.3.4, with data ports from 4001 to 4016 and 
command ports from 966 to 981. 
Removing Mapped TTY Ports 
After logging in as root, enter the directory /usr/lib/npreal2/driver and then execute mxdelsvr to 
delete a server. The syntax of mxdelsvr is: 
mxdelsvr [IP Address]
Example: 
# cd /usr/lib/npreal2/driver 
# ./mxdelsvr 192.168.3.4 
The following actions are performed when executing mxdelsvr:










