Subject: RE: Huh? TIOCMGET fails in 1.3.3? How's 1.4?
To: Brian Buhrow <buhrow@cats.ucsc.edu>
From: Michael Maciolek <mikem@ne.cohesive.com>
List: port-sparc
Date: 07/12/1999 17:22:53
Brian,
I don't think that's going to work. Browsing the include files, I see that
TIOCGFLAGS is used to access the following flags:
#define TIOCFLAG_SOFTCAR 0x01 /* ignore hardware carrier */
#define TIOCFLAG_CLOCAL 0x02 /* set clocal on open */
#define TIOCFLAG_CRTSCTS 0x04 /* set crtscts on open */
#define TIOCFLAG_MDMBUF 0x08 /* set mdmbuf on open */
#define TIOCFLAG_CDTRCTS 0x10 /* set cdtrcts on open */
while TIOCMGET is used to obtain the following flags, which use some of the
same bit positions but stand for completely different things:
#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_CAR 0100 /* carrier detect */
#define TIOCM_RNG 0200 /* ring */
#define TIOCM_DSR 0400 /* data set ready */
But it *is* helpful to know that TIOCMSET/GET are explicitly listed as not
supported in 1.3.3 or earlier. I don't mind loading 1.4, 'long as I know
it's going to work. Thanks, guys.
Regards,
Michael Maciolek
On Mon, 12 Jul 1999, Brian Buhrow wrote:
> It looks like you can continue using 1.3.3 with your application if
>you do the following:
>#define TIOCMGET TIOCGFLAGS
>#define TIOCMSET TIOCSFLAGS
>
>Those two ioctls are listed as being unsupported by the com driver.
>-Brian
>
>On Jul 12, 3:53pm, Steven Grunza wrote:
>} Subject: RE: Huh? TIOCMGET fails in 1.3.3? How's 1.4?
>} On Monday, July 12, 1999 3:26 PM, Michael Maciolek
>} [SMTP:mikem@ne.cohesive.com] wrote:
>} [snipped for space]
>} >
>} > prompt% make tio
>} > cc -O -o tio tio.c
>} >
>} > prompt% ./tio
>} > ioctl TIOCMGET: Inappropriate ioctl for device
>} >
>} > Thanks for any assistance!
>} >
>} > Regards,
>} >
>} > Michael Maciolek
>}
>} grunza@hw-ss1%(17) ls -l /dev/ttyb
>} crw-rw-rw- 1 uucp root 12, 1 Jun 4 13:08 /dev/ttyb
>} grunza@hw-ss1%(18) ./tio
>} mode=0x00000006
>} grunza@hw-ss1%(19) uname -a
>} NetBSD hw-ss1 1.4 NetBSD 1.4 (HW-SS1) #2: Mon Jun 7 12:28:48 EDT
>} 1999 root@hw-ss1:/usr/src/sys/arch/sparc/compile/HW-SS1 sparc
>} grunza@hw-ss1%(20)
>}
>} Worked ok for me in 1.4
>}
>} =======================================================
>} Steven Grunza Hardware Engineer
>} ------------------------------------------------------------------
>} --------------------------------------------
>} mailto:grunza@ulticom.com Ulticom
>} voice: (856) 787 - 2759 1020 Briggs Road
>} fax: (856) 866 - 2033 Mt. Laurel, NJ 08054
>} cubicle: K6
>} flames: /dev/null
>} ------------------------------------------------------------------
>} --------------------------------------------
>} Unix is user friendly, it's just particular about with whom it makes
>} friends.
>}
>}
>}
>}
>}
>>-- End of excerpt from Steven Grunza
>
>
>