From: becka@sunserver1.rz.uni-duesseldorf.de <becka@sunserver1.rz.uni-duesseldorf.de>
Subject: Re: Linux as a terminal server
Date: Fri, 8 Aug 1997 22:04:56 +0200 (MET DST) [thread overview]
Message-ID: <2ad88ef0c358ca787d96000bff403071.axp-list@archive.invalid> (raw)
In-Reply-To: <3.0.3.32.19970808153147.0095a100@lucifer.its.latrobe.edu.au>
> I have a need to drive a number of serial ports from a linux box allowing
> users to telnet to the linux box and get automagically connected to a free
> serial port. These ports are connected to another system which doesn't have
> an ethernet connection (don't ask why). OK, for those people who really
> need to know, it's a PDP-8...
Well - I know this is bad, bad style and no security is provided (I trust
the people on my corporate network and leave the others to the firewall
and TCP-wrappers), but anyway - here is a simple script that does what you
want for a single port. Add some locking and a loop and you will probably
have what you want.
I have thrown in a few additional comments to clarify the script which is
run by inetd.
#!/bin/bash
#
# Print a welcome banner.
#
echo You are connected to GATE of Beck Individualsoftware.
echo
echo Modem attached.
echo
echo Resetting Modem ...
#
# Now toggle the CTS line which will hard-reset my modem.
# This should not be necessary for you.
#
stty 5:0:80000cbf:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0 </dev/modem
stty 5:0:80000cb0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0 </dev/modem
stty 5:0:80000cbf:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0 </dev/modem
#
# Send a few setup commands. Not necessary for you.
#
echo -e "ATZ\015" >/dev/modem
echo -e "ATE0X0\015" >/dev/modem
#
# Now the real thing. Two cats, one for each direction.
# Kill off the first cat, if the second one dies.
#
cat </dev/modem &
trap "kill $!" 0
cat >/dev/modem
#
# End.
#
CU,Andy
--
Andreas Beck | Email : <becka@sunserver1.rz.uni-duesseldorf.de>
=== World-Wide-Web URL : http://sunserver1.rz.uni-duesseldorf.de/~becka ===
======== GGI - The Right Thing To Do : http://synergy.foo.net/~ggi/ ========
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next prev parent reply other threads:[~1997-08-08 20:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-09 14:26 Matrox Millineum: 24bpp-- Steve Borho
1997-07-09 5:46 ` jestabro
1997-08-08 5:31 ` Linux as a terminal server Huw Davies
1997-08-08 15:23 ` coder
1997-08-08 20:04 ` becka [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-08-08 11:33 Craig Burley
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox