[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: remote modem with conserver?

Greg A. Woods woods@weird.com
Thu, 6 Jun 2002 14:33:23 -0700 (PDT)


[ On Thursday, June 6, 2002 at 10:33:55 (-0700), Bryan Stansell wrote: ]
> Subject: Re: remote modem with conserver?
>
> sorry i couldn't really help, but i've got to believe that something
> like what you're looking for exists.

One half of the solution is a daemon that allocate a local pty and
connects via telnet to a remote TCP server port.  If the remote machine
were a terminal server which supports "reverse telnet" (most do), then
this would be what you'd run on the client host where you wanted to use
a program which would normally want to access a serial port tty.

These programs all do something like this:

	ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/bsd/comserv-1.4.2.tar.gz
	http://rnoc.urc.ac.ru/~anton/projects/pr/PR.html
	http://support.digi.com/pub/shareware/unix/rtty/rttysource.txt
	http://www.stallion.com/html/download/es2-utilities.html
	http://www.lantronix.com/support/utils/rtel/

The other end needs something that accepts TCP connections (preferrably
using at least some subset of the TELENT protocol), and connects them to
the real TTY port (eg. /dev/tty00).  A really simple hack just listens
for a TCP connection, forks when one arrives, attaches (dups) the
accepted socket to stdin/stdout/stderr, and then execs "cu -l ttyname".
If I'm not totally mistaken The Linux Terminal Server Project offers a
more complete solution:

	http://www.ltsp.org/

A hacked telnetd, running on some other port such as 2001, that starts
something like 'cu' instead of 'login' might work OK, though maybe even
setting a user up with a .profile which exec's "cu" should work too --
then you could have a password on it too.  Heck you could even hack
telnetd to open a device directly "telnetd -T /dev/tty00"....

Note that unless you invent a new protocol between the client(s) and the
"reverse telnet server" that goes beyond what TELNET offers there are
several things which will never work quite the same.  The major
difference between a real serial port and the pseudo-tty which provides
a reverse TELNET connection is that hardware-related characteristics
such as baud rate, number of bits per character, hardware flow control,
etc. cannot be set by the application program using the normal UNIX tty
device API (ioctl).  These characteristics must be configured in
whatever you use on the machine hosting the real hardware.

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>