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:
How can i configure the serial port on dos?
How can i telnet form dos to the serial port?
How can i set up a telnet server on the desktop (ubuntu 9.10)?
What kind of cable should I use? (db 29-m serial port on the old pc and the desktop)
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.
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!
This is a wonderful forum! I tried in other one but i received no answer...
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.
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?
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.
---------- 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!
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:
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?
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!!