| 1 | .Dd December 10, 1993 |
| 2 | .Dt COMCONTROL 8 |
| 3 | .Os FreeBSD |
| 4 | .Sh NAME |
| 5 | .Nm comcontrol |
| 6 | .Nd "control the bidirectional status of a sio port and waiting time after DTR drop" |
| 7 | .Sh SYNOPSIS |
| 8 | .Nm comcontrol |
| 9 | .Ar sio_special_device |
| 10 | .Op Cm bidir | Fl bidir |
| 11 | .Op Cm dtrwait Ar ticks |
| 12 | .Sh DESCRIPTION |
| 13 | .Nm Comcontrol |
| 14 | is used to examine and modify the bidirectional status |
| 15 | of a specified |
| 16 | sio communications port |
| 17 | and its waiting time after DTR drop. |
| 18 | By default (if |
| 19 | .Ar sio_special_device |
| 20 | only specified), |
| 21 | .Nm comcontrol |
| 22 | will print the current port state |
| 23 | (if kernel was built with |
| 24 | .Cm options COM_BIDIR ) |
| 25 | as either |
| 26 | .Cm bidir |
| 27 | to indicate that bidirectional operation is enabled or |
| 28 | .Fl bidir |
| 29 | to indicate that it is disabled, string |
| 30 | .Cm dtrwait |
| 31 | and current waiting time in ticks |
| 32 | after DTR drop. |
| 33 | To modify the status of the port or waiting time, simply |
| 34 | specify the desired new state |
| 35 | and/or new waiting time |
| 36 | on the command line. All users with |
| 37 | read access to the |
| 38 | .Ar sio_special_device |
| 39 | can use |
| 40 | .Nm comcontrol |
| 41 | to get the port's status and current waiting time. |
| 42 | Only root can set a port's status and waiting time. |
| 43 | By default, each port is initially unidirectional, waiting time is |
| 44 | 2 seconds. |
| 45 | .Pp |
| 46 | The standard way to use |
| 47 | .Nm comcontrol |
| 48 | is to put invocations of it in the |
| 49 | .Ar /etc/rc.local |
| 50 | startup script. |
| 51 | .Sh SEE ALSO |
| 52 | .Xr sio 4 |
| 53 | .Sh FILES |
| 54 | .Bl -tag -width Pa |
| 55 | .It Pa /dev/ttyd? |
| 56 | .Sh DIAGNOSTICS |
| 57 | .Cm TIOCMSBIDIR: Inappropriate ioctl for device. |
| 58 | .Pp |
| 59 | This indicates attempt to change port status on |
| 60 | a non-sio special device file, |
| 61 | or the kernel has not been built with |
| 62 | .Cm options COM_BIDIR . |
| 63 | For more information concerning reconfiguration |
| 64 | of your kernel see |
| 65 | .Ar /usr/src/sys/i386/doc/config_options.doc. |
| 66 | .Sh AUTHOR |
| 67 | Christopher G. Demetriou |
| 68 | .Sh BUGS |
| 69 | It is strongly recommended that you do *not* |
| 70 | change the bidirectional status of a port while there are programs |
| 71 | using the port. Read that as: if you do, and it breaks, don't yell |
| 72 | at me; that's a really weird thing to do. |
| 73 | .Sh HISTORY |
| 74 | Originally part of cgd's com package patches, version 0.2.1, to 386BSD 0.1. |