On Fri, 24 Sep 1999, Richard Chan wrote:

> I have tried to drop DTR and RTS using
>    ioctl(fd, TIOCMBIC, TIOCM_DTR)
> and ioctl(fd, TIOCMBIC, TIOCM_RTS)
> but  two calls have absolutely no effect on the lines
>  (by checking with a break-out  box).

>From my forthcoming Serial-Programming-HOWTO ( it will be out whenever 
I can get an SGML formatter to work ).

---------------------- HOWTO -----------------------

    The hardware modem control lines can be monitored or modified by
    the 'ioctl(2)' system call.  A set of comparable 'tc*' calls
    apparentlty do not exist.  The form of this call is:

       int ioctl( 'fd', COMMAND, (int *)flags );

    The bit pattern of 'flags' refer to the following control lines:
       TIOCM_LE      Line enable
       TIOCM_DTR     Data Terminal Ready
       TIOCM_RTS     Request to send
       TIOCM_ST      Secondary transmit
       TIOCM_SR      Secondary receive
       TIOCM_CTS     Clear to send
       TIOCM_CAR     Carrier detect
       TIOCM_RNG     Ring
       TIOCM_DSR     Data set ready

    The COMMANDS and their action are:
       TIOCMBIS  turn on control lines depending upon which bits
                 are set in 'flags'.
       TIOCMBIC  turn off control lines depending upon which bits
                 are set in 'flags'.
       TIOCMGET  the appropiate bits are set in 'flags' according
                 to the current status 
       TIOCMSET  the state of the UART is changed according to which
                 bits are set/unset in 'flags'

----------------------- End HOWTO ----------------------

Read my 'serial_suite.tgz'.  This is a collection of blurbs about the
care and feeding of the serial ports and some simple programs.  There is
a file demonstrating how the lock files should be programmed. There
is a simple getty, a dialer for ppp connections and some other misc

Via ftp:

ftp scicom.alphacdc.com

Login as "anonymous" then use your full e-mail address as the password.
For me, that is '[EMAIL PROTECTED]'.

cd pub/linux


URL ftp://scicom.alphacdc.com/pub/linux


Vernon C. Hoxie                                     [EMAIL PROTECTED]
3975 W. 29th Ave.                                        uucp: 303-455-2670
Denver, Colo., 80212                                    voice: 303-477-1780
        A person is not old until regrets take the place of dreams.

To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]

Reply via email to