Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Nov 2004 23:33:50 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Userland access to modem control lines?
Message-ID:  <062F15EA-386B-11D9-BD35-000D93C47836@xcllnt.net>
In-Reply-To: <200411171719.16370.doconnor@gsoft.com.au>
References:  <200411171719.16370.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

On Nov 16, 2004, at 10:48 PM, Daniel O'Connor wrote:

> Hi,
> Does anyone know of a way to manipulate the modem control lines from 
> userland?

See <sys/ttycom.h>, in particular the following ioctls:

#define TIOCMSET        _IOW('t', 109, int)     /* set all modem bits */
#define TIOCMBIS        _IOW('t', 108, int)     /* bis modem bits */
#define TIOCMBIC        _IOW('t', 107, int)     /* bic modem bits */
#define TIOCMGET        _IOR('t', 106, int)     /* get all modem bits */
#define         TIOCM_LE        0001            /* line enable */
#define         TIOCM_DTR       0002            /* data terminal ready 
*/
#define         TIOCM_RTS       0004            /* request to send */
#define         TIOCM_ST        0010            /* secondary transmit */
#define         TIOCM_SR        0020            /* secondary receive */
#define         TIOCM_CTS       0040            /* clear to send */
#define         TIOCM_DCD       0100            /* data carrier detect 
*/
#define         TIOCM_RI        0200            /* ring indicate */
#define         TIOCM_DSR       0400            /* data set ready */
#define         TIOCM_CD        TIOCM_DCD
#define         TIOCM_CAR       TIOCM_DCD
#define         TIOCM_RNG       TIOCM_RI

-- 
  Marcel Moolenaar         USPA: A-39004          marcel@xcllnt.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?062F15EA-386B-11D9-BD35-000D93C47836>