Re: [SLUG] Capturing /dev/tty1A informaiont (help Ian)

From: Ian C. Blenke (icblenke@nks.net)
Date: Tue Jun 10 2003 - 11:38:08 EDT


> From: "Mike Manchester" <mchester@pobox.com>
> To: "slug" <slug@nks.net>
> Sent: Friday, June 06, 2003 20:34
> Subject: [SLUG] Capturing /dev/tty1A informaiont (help Ian)
>
> > Here's the scoop.
> > At work we have a software program (tinyterm) that dials into a remote
> > site and sends and receives mostly ascii data. What we would like to do
> > is echo the traffic through the tty1A (or what ever port the modem is
> > on) to a file. In hopes of this will help troubleshoot connections
> > problems. It would be nice if there was a standard unix way of doing
> > this as we really don't want to install software on a customers site if
> > it can be helped. Is it possible to do something like this using tee and
> > maybe tail -f. We played around with using tail -f /dev/tty1a |tee
> > temp.log but we had no way to close the file thus the data was always
> > lost.
> >
> > Any help / suggestions would be appricated.

Is this a Linux box or some flavor of Unix you are attempting to connect to?

You are using the TinyTerm Unix version on a Linux/Unix box and simply want to
splice into the dialout sessions being made?

Try "ttysnoop", see if it does what you're looking to do.

If you are using TinyTerm for Windows trying to connect to a Linux/Unix box
and are having problems with something on the Linux/Unix side, the above
should work for you as well.

If putting ttysnoop on the Linux/Unix box is out of the question, you're
probably left trying to splice in the middle of something that requires a tty
to operate.

A tty/pty is more than simple stdin/stdout/stderr.

The biggest trick in getting serial communications working correctly is doing
the appropriate ioctl() calls to setup the tty. In a pinch, stty can be used
creatively to accomplish this in a script, but it's not something easy or
trivial.

Applications that require a tty/pty simply will not function with only the
output from a simple "tee" command.

Creative use of tip/cu work on older Unix boxen for commands that work with
stdin/stdout will work. However, a simple pipe command will not create a
bidirectional connection to/from an existing legacy app - you need to dup the
filehandles and do some other magic to get it to work properly.

-- 
- Ian C. Blenke <icblenke@nks.net>

(This message bound by the following: http://www.nks.net/email_disclaimer.html)



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:24:50 EDT