Capturing data off of a serial port on a 386i
Judge K Arora
kenarora at mipos2.intel.com
Wed Dec 5 11:56:48 AEST 1990
In article <1092 at 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 at mipos2.intel.com
kenarora at portia.stanford.edu (in case the 1st addr. bounces)
More information about the Comp.unix.questions
mailing list