Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Название темы: параметры COM port'a
Показать сообщение отдельно

Аватара для lxa85

Необычный


Contributor


Сообщения: 4466
Благодарности: 995

Профиль | Сайт | Отправить PM | Цитировать


Быть может это ?
26.2.5 Serial Port Configuration

The ttydN (or cuadN) device is the regular device you will want to open for your applications. When a process opens the device, it will have a default set of terminal I/O settings. You can see these settings with the command

# stty -a -f /dev/ttyd1

When you change the settings to this device, the settings are in effect until the device is closed. When it is reopened, it goes back to the default set. To make changes to the default set, you can open and adjust the settings of the “initial state” device. For example, to turn on CLOCAL mode, 8 bit communication, and XON/XOFF flow control by default for ttyd5, type:

# stty -f /dev/ttyd5.init clocal cs8 ixon ixoff

System-wide initialization of the serial devices is controlled in /etc/rc.d/serial. This file affects the default settings of serial devices.

To prevent certain settings from being changed by an application, make adjustments to the “lock state” device. For example, to lock the speed of ttyd5 to 57600 bps, type:

# stty -f /dev/ttyd5.lock 57600

Now, an application that opens ttyd5 and tries to change the speed of the port will be stuck with 57600 bps.

Naturally, you should make the initial state and lock state devices writable only by the root account.

-------
- Я не разрешаю тебе быть плохой! Потому что плохие люди совершают плохие поступки. А это нехорошо!
(Из наставлений 5 летней девочки своей младшей сестре)

Это сообщение посчитали полезным следующие участники:

Отправлено: 14:35, 02-03-2009 | #2

Название темы: параметры COM port'a