Sei sulla pagina 1di 1

/dev # dmesg | egrep 'serial|ttyUSB'

/dev # stty -F ttyUSB1

To only get actual speed:


# stty -F /dev/ttymxc0 speed
115200

To change baudrate of port 2 to 115200 :


# stty -F /dev/ttymxc2 115200

Determine if any process is attempting to use the tty by typing the following:
ps -ef | grep tty0

Type the following command:


fuser -k /dev/tty0copy to clipboard
This will clear any process that can be found running on the port and display the
PID. If the tty is still unusable, continue to the next step.

Use the strreset command to flush outgoing data from the port that is hung due to
data that cannot be delivered because the connection to the remote end has been
lost.

You need to first determine the major and minor device numbers for the tty by
typing the following:
ls -al /dev/tty0copy to clipboard
Your results should look similar to the following:
crw-rw-rw- 1 root system 18, 0 Nov 7 06:19 /dev/tty0copy to clipboard
This indicates that tty0 has a major device number of 18 and a minor device number
of 0. Specify these numbers when using the strreset command as follows:
/usr/sbin/strreset -M 18 -m 0copy to clipboard
If the tty is still unusable, continue to the next step.

On the keyboard of the hung terminal, hold down the Ctrl key and press Q. This will
resume any suspended output by sending an Xon character.
If the tty is still unusable, continue to the next step.

A program will sometimes open a tty port, modify some attributes, and close the
port without resetting the attributes to their original states. To correct this,
bring the tty down to a DEFINED state and then make it available by typing the
following:
rmdev -l tty0copy to clipboard
This command leaves the information concerning the tty in the database but makes
the tty unavailable on the system.
The following command reactivates the tty:
mkdev -l tty0

Potrebbero piacerti anche