Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!news.larc.nasa.gov!hal.larc.nasa.gov!alan From: alan@hal.larc.nasa.gov (alan dare) Newsgroups: comp.sys.sgi Subject: tty problems Message-ID: <1991May1.144614.5582@news.larc.nasa.gov> Date: 1 May 91 14:46:14 GMT Sender: news@news.larc.nasa.gov (USENET Network News) Distribution: usa Organization: NASA Langley Research Center, Hampton, VA USA Lines: 27 Originator: alan@hal.larc.nasa.gov I having a problem using the tty ports to input data at 19200 baud on my 310 VGX. I've connected an Ascension Technology head tracker to ttyd2. The port is set up as follows: port_setup.c_line = LDISC0; port_setup.c_iflag = IGNBRK | IGNPAR; port_setup.c_oflag = 0; port_setup.c_cflag = B9600 | CS8 | CLOCAL | CREAD; port_setup.c_lflag = 0; status = ioctl(fd, TCSETA, &port_setup); I read the port with "read(fd, &buffer, 12)" because i'm expecting a record to contain 12 bytes. The problem is sometimes it works...and sometimes it doesn't. It may read 5, 10, 20 or 50 records and then hang. A rep from Ascension Technology thinks the driver may not be an interrupt driven driver thus missing some data and some how hanging. I've not been able to find any documentation describing the driver behind ttyd2. Does anyone know? Has anyone out there used a device to input binary data at 19200 baud on the tty ports with success or know what the problem might be? Thanks... -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | In your head is the answer. Let it guide you along. | | Let your heart be the anchor and the beat of your song. |