User`s manual

UPort 1200/1400/1600 Series User’s Manual Driver Installation
2-45
Setting the Serial Parameters
After installing the Moxa Linux Driver, you will be able to configure parameters.
1. Serial Interface:
The UPort 1250/1250I/1450/1450I/1650-8/1650-16 supports four interfaces: RS-232, RS-485
2W, RS-485 4W, RS-422. If you want to switch to a different interface, execute the setserial
command to set the port’s interface. The supported parameters are listed below.
Parameter Value Interface
0x0 RS-232
0x1 RS-485 2W
0x2 RS-422
0x3 RS-485 4W
Example:
(i) The following command sets the interface of “/dev/ttyMXUSB0” to RS-422:
# setserial /dev/ttyMXUSB0 port 0x2
(ii) Use the following command to look up the serial settings of the current port:
# setserial -g /dev/ttyMXUSB0
2. Serial Baudrate:
spd_hi Use 57.6 KB when the application requests 38.4 KB.
spd_vhi Use 115.2 KB when the application requests 38.4 KB.
spd_shi Use 230 KB when the application requests 38.4 KB.
spd_warp Use 460 KB when the application requests 38.4 KB.
spd_normal Use 38.4 KB when the application requests 38.4 KB.
Example:
# setserial /dev/ttyMXUSB0 spd_vhi
Troubleshooting
1. Compile error
Building a Moxa driver requires kernel header files. If you get a compile error, run
rpm -qa | grep kernel to check if the kernel-source package is installed properly. If not, get
the kernel-source irpm package and run rpm -ivh <pacakge> to install it. You also need to
make sure the build tool is ready by including make/gcc/lib. See Linux related documents for
more information.
2. No such file or directory
This problem occurs when a device node is not generated automatically when loading the
driver. It usually happens with previous kernel versions, such as versions 2.6.0 to 2.6.5.
Therefore, just execute the make node script “upmknod” to generate the device node.