Search Text         
Search Tips?
Search By   And   Or   Boolean   Exact Match   TA #
Search In   Whole Doc   Keywords Sort By  
Product   Sub Product  

View Technical Articles (sorted by Product) New/Updated in the last:    7 days      14 days      30 days             
TA # Date Created Date Updated Resolved Issue?   Printer Friendly Version of This TA   Print Article
  E-mail This TA   E-mail Article
107162 08/12/1988 05:31 PM 05/04/2001 01:09 PM
Yes No
Verifying Serial Line Characteristics
Keywords
serial terminal baud stty gettydefs tty parity line characteristics peripheral devices
Release
Generic

Problem
Verifying Serial Line Characteristics

Solution
         

REFERENCE DOCUMENTATION:   SCO XENIX System V Operating System Release 2.2, 
                              Run Time Environment: 
                               Operations Guide: Using Peripheral Devices: 
                                    Changing Serial Line Operation, Setting the 
                                    Terminal Type
                               SCO XENIX Release 2.3 System Administrator's
                                   Guide: Chapter 14: Using Terminals and 
                                       Modems
                                SERIAL(HW)
                           SCO XENIX System V Operating System Release 2.2, 
                               User's Reference: TTY(M), GETTYDEFS(F), STTY(C)

==============================================================================

1) Enter your terminal's set up mode and set the terminal for 9600 baud, 8 data
   bits, 1 stop bit, and no parity.  If your terminal doesn't have these 
   capabilities, see if your terminal's manual gives specific serial line
   characteristics for the terminal.  If so, set the terminal accordingly.

              Note:  Your terminal may only run on even parity or you may need
                     to run at a lower rate than the default settings in the
                     "/etc/gettydefs" reference line.

              
2) Now you need to make sure that the SCO XENIX definition of serial line 
   settings match those you just set on your terminal.

   a) Log in to your terminal. 
      
      Note: If you can't log in, then log in as root on the console or
            another terminal. Find the serial settings of the terminal in
            question by typing:

                     stty -a < /dev/ttyname

             where "ttyname" is the tty to which you have hooked up the
             terminal.  Make sure that the following settings are there.          
     
                     speed 9600 baud;              -Baud rate of 9600 baud
                     -parenb                       -No parity
                     cs8                           -Eight data bits
                     -cstopb                       -One stop bit

            Make sure they match the ones that are set on the terminal.
            If not, change the terminal's settings until they match 
            those of SCO XENIX. If you can't or don't want to do this, you
            can change the SCO XENIX serial line settings by editing
            the "/etc/gettydefs" and "/etc/ttys" files for that terminal as 
            described below.

   b) Find the tty device name of the serial port your terminal is connected to 
      by typing: 
                     tty

      You should see something like:

                     tty1a

   c) Next look in the file "/etc/ttys" and find the entry that has your 
      tty device name in it.  The whole line for your device name should
      look similar to this:

                     1mtty1a

      Be sure to find the entry that ends with a lower case letter, because 
      the entries ending with a capital letter are for modems.  The first
      character in the line tells you if your serial port is enabled.
      It should be set to 1. If not, login as root and type:

                     enable ttyname 

      The second character indicates which line of the file "/etc/gettydefs" 
      has the serial line definitions for your port. It should be set to "m". 
      If it is not correct, disable the tty, correct the entry, and then
      enable the tty again.  Do not edit the ttys file while the serial
      port is enabled. 
      
   d) Now look in the "/etc/gettydefs" file and find the line that looks like:

      m # B9600 HUPCL # B9600 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # m

      The characteristics in the third field of the gettydefs entry must 
      match your terminal's serial line settings (as shown by stty above).
      If the third field does not match your terminal's settings, go to step 3.
              
              Note:  In each line of "/etc/gettydefs", the delimiter "#"
                     separates a field in the line.  The first field is the
                     label for the line.  The second field gives
                     the line characteristics in effect prior to login.
                     The third field gives the line characteristics in
                     effect after login.  This third field is the one that
                     must match your terminal's serial line settings.
                     The default reference lines for the non-modem control
                     devices are either line "m" or line "6" in the file
                     "/etc/gettydefs". 
                       
                       The "m" and "6" lines are the same, with one 
                       difference:  Line "6" allows you to cycle to different 
                       baud rates by referring to another gettydef line, while 
                       line "m" refers back to itself. For more information, 
                       see GETTYDEFS(F).

3) Now you have to change your terminal's reference line in "/etc/gettydefs" 
   to one that matches the new terminal settings.

   a) Look in "/etc/gettydefs" for a line that has serial line characteristics 
      in the third field that match your terminal's settings.
                 
   b) If you find a matching line, edit your entry in "/etc/ttys". Change the 
      second character so that it matches the character in the first field of 
      the line you need in "/etc/gettydefs".
                  
   c) If no line in "/etc/gettydefs" fits your needs, you should
      write a new one.  Give the new line an unused label, such 
      as "q." For directions, see the section "Changing the gettydefs File". 

   d) Whenever you make a change to "/etc/gettydefs", you should verify
      that the entries are all valid.  You can do this by running getty
      with the check option.  For example, to check "/etc/gettydefs", enter:

      getty -c /etc/gettydefs

      Any unknown entries will be highlighted and can then be corrected.            
NOTE:
      The mode "SANE" in all of the entries of "/etc/gettydefs" refers to a
      collection of "termio" parameters that, when applied to a terminal,
      will guarantee that the terminal will be returned to some kind of
      usable state.
Related Articles
•  Different AST Cards & their compatibility with SCO XENIX.
•  Installing COM 3 Sperry 4 port multiport board fails on Xenix.
•  Escape sequences for configuring local printer on IBM 3151 terminal.
•  SCO XENIX Serial Printer Install package.
•  Carriage Return and New Line Mapping for Printers
Back to Search ResultsBack to Search Results