Google Answers Logo
View Question
 
Q: Terminal under Linux ( Answered,   0 Comments )
Question  
Subject: Terminal under Linux
Category: Computers > Programming
Asked by: ga1000-ga
List Price: $10.00
Posted: 06 Feb 2003 17:11 PST
Expires: 08 Mar 2003 17:11 PST
Question ID: 158276
I have an 8 port RS232 board used to connect to eight Wyse60
terminals.

After log in, the prompt sign will not come back unless I key in
control c from the terminal to 'wake it up', then the prompt sign will
come back.

A sample screen shot can be seen from www.InfoOnCall.com/screen.jpg.
Please also note that, after the 'dir', the file names do not line up
properly neither.

Any suggestions on what is the cause of this? Hardware seems to be
working OK, because the Wyse terminal can receive characters properly
when it is used not as a log in device, but as a receiver for RS232
test.

Does it look like a device driver problem? Or a Linux set up problem?
Please let me know.

Request for Question Clarification by maniac-ga on 06 Feb 2003 17:46 PST
Hello ga1000,

There may be a number of problems - let me make a few suggestions, see
what the results are and then work on some solutions.

The Wyse 60 terminal may implement some modes that are not supported
by Linux.
  http://osr5doc.ca.caldera.com:457/HANDBOOK/terminal_troubleshooting.html
has references for SCO Unix, but has some information that may be
relevant; see "fixing hung terminals" and the two scanmode related
items.

You may need to verify the configuration of the setup for each Wyse
60. A good starting point appears at
  http://www.soldii.com/techdocs/wyse.html
or
  http://216.239.57.100/search?q=cache:DG40TI6f4aUC:www.simcen.com/support/wyse60.asp+wyse+60+terminal&hl=en&ie=UTF-8
which provide some good instruction on set up to a configuration that
should work with your system.

Try these suggestions and let me know if these fix the basic problem.

The line up of the characters could be one of a few problems:
 - the tab stops are not set at multiples of eight characters
 - the Linux system is sending tabs, but the terminal does not handle
them
 - the set up was not correct (see above steps)
or a few others. If you get good output (except alignment) from the
previous steps, please indicate the result of
  stty -all
so I can check the terminal settings for something that may be in
error.

  --Maniac

Clarification of Question by ga1000-ga on 06 Feb 2003 20:25 PST
(1) Linux(RED HAT 7.1) and Wywe60 have no problems when used with
another older ISA bus based board. I should have mentioned that only
three pins(send, receive and ground) are used, so no hardware
handshake is possible.

Since the baud rate matches for both ends(19200). Software handshake
xon xoff are not implemented on the PC side, althout Wyse60 has the
xon xoff implemented.

I used getty, copies from an earlier version of Red Hat. Red Hat 7.1
does not provide getty.

(2) stty --all result is as follows:( the alignment is not right, and
the prompt will not get back, as screen.jpg shows)

speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase =
^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
-ixoff
-iuclc ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt
-echoctl -echoke

Request for Question Clarification by maniac-ga on 07 Feb 2003 10:21 PST
Hello Ga1000,

Hmm. The terminal settings appear OK though they are slightly
different from the RH 7.1 system I have access to. The differences I
noted (but should not matter) were for
  brkint, ignpar, iextend, echoctl, and echoke
I doubt changing these would have an effect, but it may be worth a
try.

You mention the lack of getty on Red Hat 7.1. There are at least two
replacements that should work for you. The command
  apropos getty
lists
  agetty (8) - alternative Linux getty
  mgetty(8) - smart modem getty
  mgettydefs (4) - speed and terminal settings used by mgetty
  mingetty (8) - minimal getty for consoles
[the last one is for virtual consoles only - the man page for it
recommends using mgetty over agetty though I am not sure why]

What I suggest at this point is to go through the Wyse 60 terminal
settings as described in the two configuration pages I referred to.
Some of the items listed such as "Auto Scroll" (under general),
"Autopage" (under misc), and the Hndshk settings (under comm) may
cause the effects you are seeing. Setting the Personality (under
general) to VT100 may help as well. These are especially important
since you have only three wires (transmit, receive, ground) instead of
a full RS-232 connection.

Another thing that comes to mind - the terminal *might* not be fast
enough to run at the speed you are using with the terminal settings.
This can be ruled out by setting the baud rate to something slow - say
1200 on the computer and terminal and see if the problem still exists.
If the problem goes away - there are some suggestions I can make to
fix that kind of problem as well.

  --Maniac

Clarification of Question by ga1000-ga on 07 Feb 2003 12:49 PST
(a) To use getty, I have to have a gettydefs file in the /etc. Is
there any extra file or set up I need in order to use agetty? Took me
some struggle to find out that getty alone would not work.

(b) What is difference between LF(line feed) and CR(carriage return)?
When we hit the Enter key after the 'dir', which one of the above is
sent from the terminal to the PC?

(c) I checked the ASCII tables and did not find the equivalents of LF
and CR in the table, would you tell me where they are in the ASCII
table(their ascii values)?

(d) what character you think is missing from either the terminal to
the PC or from the PC to the terminal that you think is missing, so
that the prompt sign is not seen? Please give me your educated guess.

(d)I will continue the investigation and ask new questions later. If
you think above questions exceed the worth of $10, please let me know
and I will change the fee to $15. Otherwise please just answer above
and close the question on your end to get paid.

Thank you.

Clarification of Question by ga1000-ga on 08 Feb 2003 11:10 PST
I have found out the meaning and ASCII values of Linefeed and Carriage
Return by writing a simple program to send to and receive from the
terminals.

Please just tell me where I can find the source code of either getty
or agetty, if you can, and then close the question on your end.

Thank you.
Answer  
Subject: Re: Terminal under Linux
Answered By: maniac-ga on 09 Feb 2003 16:12 PST
 
Hello Ga1000,

I will first answer the items raised by the two clarifications and
then summarize the methods to help isolate problems with Wyse 60
terminal connections to Linux (on 3 wire RS-232).

(a) According to the man page for agetty
  http://www.linuxcentral.com/linux/man-pages/agetty.8.html
the separate configuration file (e.g., /etc/gettydefs) is not used.

(b) By default on a CRT, line feed moves the cursor down one line and
carriage return moves the cursor to the far left. However, the
terminal can be configured in a variety of ways - for your case, check
the Set up parameters (under "General" or "Keyboard") for the Wyse 60
to see what options you have and how they are set up. These affect
what is sent on "Enter" - so I can't answer the second half of this
question without knowing the Set up parameters.

(c) ASCII values for CR, and LF are in
  http://nodevice.com/sections/ManIndex/man0051.html
which reproduces the ascii man page for Linux. Note that LF is octal
12 (decimal 10) and CR is octal 15 (decimal 13).

(d) What do I still think is missing? There are three things I would
look at more carefully:
  1 - The Wyse 60 Set Up parameters. I looked a little more on the web
and found some references on Wyse's site at
  http://www.wyse.com/service/support/kbase/FAQwt.asp?Q=7
and especially the description of
  http://www.wyse.com/service/support/kbase/wits/80359.txt
which describes a terminal lock up (and reset technique). This is
particularly frustrating since the manual describing the device
doesn't appear to be on line. The best I found was
  http://www.wyse.com/service/support/kbase/KBmenu1.asp?Q=7
which has links to a number of other pages that describe various
functions of the terminal and how the host can interact with it.
  2 - The serial interface card. You never mentioned the vendor, but
there may be some settings in that device as well. I have used
Cyclades cards before - if it is one of those, I can make some
suggestions for that specific device as well.
  3 - Try another terminal / PC to rule out problems with a specific
terminal (or type of terminal).
I am assuming you don't have an RS-232 analyzer - using one of them
may be helpful as well (if you can get access at a reasonable cost).

(e) I always let the customer decide what the answer is worth. A good
rating and tips are certainly appreciated if the answer was truly
helpful.

[next clarification]

The source to a Red Hat version of these products is available from
 - the CD ROM distribution - check the source disks (if you bought a
boxed set) and look for a file like
  /usr/src/redhat/SRPMS/getty-(version data...).rpm
and that will have the source you need.
 - on line copies at
  ftp://ftp.redhat.com/pub/...
there are a few intervening directories since the ftp site has source
for a number of releases concurrently.
 - through a search engine such as rpmfind. For example:
  http://www.rpmfind.net/linux/rpm2html/search.php?query=getty&submit=Search+...&system=&arch=
finds the getty package. 
  http://www.rpmfind.net/linux/rpm2html/search.php?query=mgetty&submit=Search+...&system=&arch=
for mgetty. I did not get any Red Hat hits for agetty until I tried
  http://www.rpmfind.net/linux/rpm2html/search.php?query=%2Fsbin%2Fagetty&submit=Search+...&system=&arch=
which looks for /sbin/agetty and found it in "util-linux".

Which brings up a helpful search tip, if you don't know the name of a
package that a file is included in, try
  rpm -q -file /sbin/agetty
for the package installed with that file in it.

Good luck. I hope you get this one straightened out without too much
more effort.

  --Maniac
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy