Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!olivea!orc!inews!mipos2!kenarora From: kenarora@mipos2.intel.com (Judge K Arora) Newsgroups: comp.unix.questions Subject: Re: Capturing data off of a serial port on a 386i Summary: Another question Message-ID: <1248@inews.intel.com> Date: 5 Dec 90 00:56:48 GMT Sender: news@inews.intel.com Reply-To: kenarora@mipos2.intel.com (Judge K Arora) Organization: Microprocessor Component Group, Intel Corp., Santa Clara, CA Lines: 32 In article <1092@inews.intel.com> I (Judge K Arora) write: > I'm trying to capture data that's coming off a serial port from another >computer (PC) onto my 386i (Sun OS 4.0.2). I'd like to capture in from a >program running on the console. I've configured /etc/ttytab (and /etc/ttys ... >the correct settings, and secondly, what is the open call (and further >ioctl's, if necessary) needed to do this (I believe canonical mode will >do)? Yes, I know I'm supposed to open /dev/ttya, and I also know about the termios data structures (using ioctls for TCGETS, TCSETS). The problem is that (at least at 9600 baud, w/o RTS/CTS handshaking, because the PC doesn't support it) I keep dropping characters every so often (about every 7000-8000 characters), and get some garbled data instead (usually mostly ascii 02 (control-B)). I've also tried doing this from the shell (cat < /dev/ttya > foo), and encountered the same problem. I've tried setting the IXOFF protocol in the termios data structure, and that doesn't seem to help. I'm still using canonical mode, but the few experiments I've tried with non-canonical mode don't seem to work any better. Has anyone else tried doing this? on a 386i? Is 9600 baud too fast? Should I change a specific flag in the termios struct? Will non-canonical mode help? The answers to these and other exciting questions are eagarly awaited (next week, same 'nix-time, same 'nix-group) Thanks again, Ken Arora kenarora@mipos2.intel.com kenarora@portia.stanford.edu (in case the 1st addr. bounces)