Moxa UC-8410A-LX [22/86] Bdisplaying all serial terminal settings

Moxa UC-8410A-T-LX [22/86] Bdisplaying all serial terminal settings
UC-8410A Series Linux Software Advanced Configuration of Peripherals
3-2
Serial Ports
The serial ports support RS-232, RS-422, and RS-485 2-wire operation modes with flexible baudrate settings.
The default operation mode is set to RS-422. Use the
setinterface command to change the operation
mode as follows:
Usage: setinterface device-node [interface-no]
Device-node: /dev/ttySn; n = 0,1,2,...
Interface-no: Refer to the following table
Interface
Number
Operation Mode
None Display current setting
0 RS-232
1 RS-485 2-wire
2 RS-422
3 RS-485 4-wire
For example, to set /dev/ttyS0 to RS-485 2-wire (RS485-2W) mode, use the following command:
moxa@Moxa:~# sudo setinterface /dev/ttyS0 1
Now setting is RS485-2W mode
moxa@Moxa:~# sudo setinterface /dev/ttyS0
UART Port#0 is in RS485-2W Mode
stty
The stty command is used to manipulate the serial terminal settings. You can view and modify the serial
terminal settings with this command as described below:
Displaying All Serial Terminal Settings
The following text shows how to display all settings:
moxa@Moxa:~$ sudo stty -a -F /dev/ttyS0
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

Содержание

Скачать