Telnet to a serial port

Hello all.
I have an old computer with M$-DOS 7. I want to use it like a dumb terminal, with telnet. I need to connect it to my desktop These are my questions:

  1. How can i configure the serial port on dos?
  2. How can i telnet form dos to the serial port?
  3. How can i set up a telnet server on the desktop (ubuntu 9.10)?
  4. What kind of cable should I use? (db 29-m serial port on the old pc and the desktop)

Thanks for any answer.

Ps. I hope i'm posting in the correct item.

Telnet is a network protocol. You would find setting up a simple serial connection easier.
Enable login on the serial port (ttyS0) by modifying /etc/inittab,
Get a DOS terminal emulation program, like kermit, which is available from
http://www.columbia.edu/kermit/msk314.html
Use a null modem cable, pin 2 connected to pin 3, pin 3 connected to pin 2, and pin 7 straight, for a direct connection, on a 25pin connector. Or buy a straight through cable, and a null modem adapter.
Try baud rates between 9600 and 38400.

If you can find it, the old TELIX was a fantastic DOS serial program.

Are you sure that you have MSDOS-7 ? A rare beast.
What does the "ver" command display?

Set the communications protocol to x-on/x-off, rather than hardware control (cts/rts).
The cable requirements for hardware control are different, and without standards.
You might find this link useful.
TCP/IP network for MS-DOS

Thanks to all! (and excuse me for the late reply...)
I'm trying this helpful suggestions! :slight_smile:
This is a wonderful forum! I tried in other one but i received no answer...

Thanks again!!

P.s: I'm sure i have DOS-7. I downloaded it from http://ms-dos7.hit.bg ...

EDIT:

I have some problems.

  1. My serial port has 9 pins. Not 25. Have I to buy another one? An adapter? Can I configure my terminal with the 9-pins serial port?
  2. I don't know how to configure kermit. I'm looking for tutorials and howto.

Thanks for any reply!

This website has lots of good RS232 information. You do not need the rts/cts connections.
RS232 serial cable pinout information

Start by configuring kermit for 9600 baud, 8 bits, no parity, 1stop bit. Presumably you will be using COM1. If your DOS computer has two serial ports, you will have to determine which is COM1 and which is COM2.

Read the man pages for inittab, agetty, and if you have trouble sleeping termios.

You can use the 9 pin ports.

I think I understood.
I'm buying a RS232 Null Modem cable.
In ubuntu 9.10 there is not /etc/inittab. Init reads the command to execute by files in the /etc/init directory. However i think i will resolve.

Thank you again for your instructions!

Ps: If i'll have problems, i'll edit this post. Thanks again!
--------EDIT---------
I have a problem! In the DOS kermit client i don't see login prompt and no activity!
Here is my configuration. In both computers I have one serial port, db9 (9 pins). I connected the 2 pc with the null modem cable. I started kermit on the DOS pc. I setted no parity (set parity none). I setted 1 stop bit (set stop-bit 1). I setted 8 data bit (set term byte 8). port com1 (set port com1). baud 9600 (set baud 9600). set flow-control xonn/xoff. And finally i connected (connect).
In the shell of desktop ubuntu pc i typed: 'sudo /sbin/getty -8L 9600 /dev/ttyS0 vt320'
(vt320 is the model of emulated terminal). The command just hangs... And i dont see any login prompt on the dos pc. No garbage, nothing at all.

I tried a lot of times, but i'm not an expert... How can I do?

Thanks for any answer!

Did you set software flow control in kermit? If either end's on hardware flow control, they may refuse to talk to each other.

Try leaving off -8, I hadn't needed that when I used serial terminals.

Try -l /bin/bash in case the login program is messing up for some reason.

Try just giving it ttyS0 instead of /dev/ttyS0.

Try agetty instead of getty.

If you unplug the cable from the DOS PC, and just bridge pins 2-3 of the serial port with a piece of wire, do you see anything when you type? If your DOS terminal emulator's working at all you should see what you type.

And be sure to hit the enter key on your DOS machine to see the login prompt.

Thank you! :slight_smile:

Trying now.
Thanks again.

---------- Post updated at 07:05 PM ---------- Previous update was at 06:28 PM ----------

I setted the flow control to xon/xoff. (set flow-contron xon/xoff). I cutted -8 and added -l /bin/bash. And still no output.

When i maked a bridge between pin 2 and 3 i got the typed characters. So, the terminal emulator works well... But none login prompt

How can I do?
Thanks for any help!

---------- Post updated at 07:39 PM ---------- Previous update was at 07:05 PM ----------

I installed putty on the server and i connected to ttyS0. I maked a bridge between pin 2 and 3 (on the server) and i got the typed characters.
So: the serial port works fine in the desktop and in the dos pc. The problem may be: 1- the cable 2- the getty command!

Please help me !!
Thank you again for any answer!

If you need more infos, please ask me!

ps: I use ubuntu 9.10 karmic koala, and freebsd

Check you man pages for "init" and "inittab".
From my reading, the fact that you do not already have an /etc/inittab file, does not mean that if you have one, it will not be processed.
Create /etc/inittab with a line like the following:

SO:235:respawn:/sbin/agetty -L 9600 ttyS0 [ansi|vt100]

Choose one of ansi or vt100 and leave out the [], whichever you choose should match your settings in kermit.

Init does not read the file /etc/inittab but the file in /etc/init.
This is the ubuntu man page of inittab.

inittab(5)                                                          inittab(5)

NAME
       inittab - init daemon configuration

SYNOPSIS
       /etc/inittab

DESCRIPTION
       The  /etc/inittab  file was the configuration file used by the original
       System V init(8) daemon.

       The Upstart init(8) daemon does not use this file,  and  instead  reads
       its  configuration  from  files  in  /etc/init.   See  init(5) for more
       details.

SEE ALSO
       init(8) init(5)

Upstart                           2009-07-09                        inittab(5)

Can I use getty directly form the shell? Must I use it in inittab?

Thanks again for any answer!

EUREKA!!!
Solved,
i could not create the /etc/inittab, but i added this file /etc/init/ttyS0.conf
i copied the contents from /etc/init/tty1.conf. I changed a bit of the getty command and i rebooted. Pressed enter at kermit connection in the dos pc and i got the login string!!

It worked!!

Thanks a lot for your usefuls posts!!. :slight_smile: