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

From: Mike Manchester (mchester@pobox.com)
Date: Tue Jun 10 2003 - 20:03:50 EDT


Ian, Thank you very much for your response. I was hoping you would see
this post. We are running tinyterm on a falvor of Unix ( I would rather
not mention the name on a Linux group ;) ). To dial in to a bbs, and
since most of the boxes have only one modem we have to do the dialing
and retreiving of the data through an at command, thus the data capture
to see what we cant see if there were two modems involved. I was hoping
to not have to install software on a clients site but in the rear
occasion that we would need it for debugging I guess ttysnoop might do
the trick if it will run on Unix's other than Linux.
Thanks again for the respone
Mike M.

On Tue, 2003-06-10 at 11:38, Ian C. Blenke wrote:
> > 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.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:26:40 EDT