Subject: Telnet to serial port
To: None <port-vax@netbsd.org>
From: Felix Deichmann <f.dei@web.de>
List: port-vax
Date: 03/14/2003 17:59:19
Hi.

I want to telnet to the console serial port of a VAX.
So I try to setup a NetBSD computer which opens a pseudo telnet server and redirects the input to its serial port, which is finally connected to the VAX' console serial port, and vice versa:

VAX|Serial port <---> Serial Port|NetBSD computer|Telnet server <---> Telnet Client


A possible solution under Linux is to use netcat on the "agent":

\begin{citation}

  put this in inittab
  nc:2345:respawn:/usr/local/bin/serialserv

  serialserv:

  #!/bin/sh
  exec nc <>/dev/ttyS0 -l -p 23

\end{citation}

I tried it under NetBSD with nc < /dev/ttyC0 > /dev/ttyC0 -l -p 23, but I get "Connection refused" when I try to connect.


I also tried a solution where I used inetd, which has no connection problem. But it seems as if nothing arrives at the serial port (?). Inetd executes a script which contains:

cat > /dev/ttyC0 < /dev/ttyC0

Perhaps I'm quite stupid and don't know how to use the commands :-)

Nevertheless my questions are:

How can I get the "nc" solution working? (And the "inetd" solution)
What's the matter with the serial port/driver?
How must I set the serial port (with stty) to be compatible with the VAX (9600 baud and so on) at the other end?


Thanks in advance

Felix
______________________________________________________________________________
Werden Sie kreativ! Bei WEB.DE FreeMail heisst es jetzt nicht nur schreiben,
sondern auch gestalten. http://freemail.web.de/features/?mc=021142