Click to See Complete Forum and Search --> : Digital VT420 ......


xerid
07-05-2001, 10:49 AM
I am trying to get my newly acquired Digital VT420 terminal working on the serial port of my Linux box....but it's not.

These are the steps I took.
I used the rc.serial file that coems with setserial, put it in /etc/rc.d and ran it from the command promt instead of rebooting


#
# /etc/rc.serial
# Initializes the serial ports on your system
#
# chkconfig: 2345 50 75
# description: This initializes the settings
# of the serial port
#
# FILE_VERSION: 19981128
#
# Distributed with setserial and the serial
# driver. We need to use the
# FILE_VERSION field to assure that we don't
# overwrite a newer rc.serial
# file with a newer one.
#
# XXXX For now, the autosave feature doesn't
# work if you are
# using the multiport feature; it doesn't
# save the multiport configuration
# (for now). Autosave also doesn't work for
# the hayes devices.
# Will fix later...
#
#

RCLOCKFILE=/var/lock/subsys/serial
DIRS="/lib/modules/`uname -r`/misc /lib/modules /usr/lib/modules ."
PATH=/bin:/sbin:/usr/bin
DRIVER=serial
DRIVER_NAME=serial
MODULE_REGEXP="serial\b"

ALLDEVS="/dev/ttyS?"
if /bin/ls /dev/ttyS?? >& /dev/null ; then
ALLDEVS="$ALLDEVS /dev/ttyS??"
fi

SETSERIAL=""
if test -x /bin/setserial ; then
SETSERIAL=/bin/setserial
elif test -x /sbin/setserial ; then
SETSERIAL=/sbin/setserial
fi

#
# See if the serial driver is loaded
#
LOADED=""
if test -f /proc/devices; then
if grep -q " ttyS$" /proc/devices ; then
LOADED="yes"
else
LOADED="no"
fi
fi

#
# Find the serial driver
#
for i in $DIRS
do
if test -z "$MODULE" -a -f $i/$DRIVER.o
then
MODULE=$i/$DRIVER.o
fi
done

if ! test -f /proc/modules ; then
MODULE=""
fi

#
# Handle System V init conventions...
#
case $1 in
start)
action="start";
;;
stop)
action="stop";
;;
*)
action="start";
esac

if test $action = stop ; then
if test -n ${SETSERIAL} -a "$LOADED" != \
"no" -a `head -1 /etc/serial.conf`X = \
"###AUTOSAVE###X" ; then
echo -n "Saving state of serial devices.."
grep "^#" /etc/serial.conf > /etc/.serial.conf.new
${SETSERIAL} -G -g ${ALLDEVS} >> /etc/.serial.conf.new
mv /etc/serial.conf /etc/.serial.conf.old
mv /etc/.serial.conf.new /etc/serial.conf
echo "done."
fi
if test -n $MODULE ; then
module=`grep $MODULE_REGEXP /proc/modules | awk '{print $1}'`
if test -z "$module" ; then
echo "The $DRIVER_NAME driver is not loaded."
rm -f ${RCLOCKFILE}
exit 0
fi
if rmmod $module ; then :; else
echo "The $DRIVER_NAME driver could NOT be unloaded."
exit 1;
fi
echo "The $DRIVER_NAME driver has been unloaded."
fi
rm -f ${RCLOCKFILE}
exit 0
fi

#
# If not stop, it must be a start....
#

if test -n $MODULE -a "$LOADED" != "yes" ; then
if insmod -fm $MODULE $DRIVER_ARG \
> /tmp/$DRIVER.map 2> /tmp/$DRIVER.$$; then :;
else
echo "Couldn't load $DRIVER_NAME driver."
echo "See error logs in /tmp/$DRIVER.$$"
exit 1
fi
/bin/rm -f /tmp/$DRIVER.$$
fi

if test -f /etc/serial.conf ; then
if test -n ${SETSERIAL} ; then
grep -v ^# < /etc/serial.conf | while read device args
do
${SETSERIAL} -z $device $args
done
fi
else
echo "###AUTOSAVE###" > /etc/serial.conf
fi

touch ${RCLOCKFILE}
${SETSERIAL} -bg ${ALLDEVS}


And the output it
/dev/ttyS0 at 0x03f8 (irq = 4) is a 16550
/dev/ttyS1 at 0x02f8 (irq = 3) is a 16550

Then, I set up the inittab file by adding getty lines.
First I tried the lines

#S0:235:respawn:/sbin/agetty -L 38400,19200,9600,2400,1200 ttyS0 vt100
#S1:235:respawn:/sbin/agetty -L 38400,19200,9600,2400,1200 ttyS1 vt100

then I tried ...


#S0:235:respawn:/sbin/getty ttyS0 DT19200 vt420
#S1:35:respawn:/sbin/getty ttyS1 DT19200 vt420


but both cases result in the message like:
"respawning too fast: disabling for 5 minutes"

I tried doing this with the terminal both on and off, but nothing works

I tried
cp my_file /dev/ttyS0
cp my_file /dev/ttyS1
and I dont get errors

setserial /dev/ttyS0 and S1
returns the expected configuration

stty -F /dev/ttyS0 or S1 returns
stty: /dev/ttyS0: Input/output error

The wiring:
A modified RJ-11 (to act as an MMP connector)
to RJ-45, which is plugged into and RJ-45 to serial converter attached to the back of my box.
I used a wiring scheme that maps
RJ-11 to RJ-45 (eliminating blue and
white-blue) The rj-11 was used becuase it's basically the same as an MMP (Just remove the clip)

ALSO, I TRIED THE text-terminal how-to and looked over the serial how-to, but nothing seems to work.

ANY HELP WOULD BE GREAT.

xerid

[ 05 July 2001: Message edited by: xerid ]

bdg1983
07-05-2001, 06:29 PM
Sorry... no idea myself.

Have you tried the how-to's?

http://www.linuxdoc.org/sorted_howtos_quick.html

Perhaps the Serial How-To as it does have a section on terminals.

xerid
07-06-2001, 09:19 AM
I am no able to echo text to /dev/ttyS0 and 1, but it does not display on the terminal....

Has anyone done this?