stty questions

stty questions

Post by Dave Walle » Sun, 29 Oct 2000 06:14:31



I am trying to set up a dumb terminal on a 7318 S20 (Comunications
Server) and I am stuck on the options that I need to set for it to work.

By default all of the ports are set up to accomodate a IBM 3151
terminal.  I have 1 of those and a heap of ADDS terminals.  The 3151
works like a charm.  The ADDS blink their cursor and that is it.

I have tried a good number of combinations and am not getting any
where.  I believe that I need to turn on software flow control, and am
not sure how.

Any advice would be great.

Dave Waller

 
 
 

stty questions

Post by Joh » Sun, 29 Oct 2000 23:13:37


I'll bet the 3151 has a null-modem in the cable and the ADDS don't.
Is there an extra device about 2 inches long sticking out from the
back of the 3151's interface?  If so, move the cable THERE to one
of the ADDS.  If not, it's probably somewhere else in the cable.

If you don't have a null-modem, go to Radio Shack and spend $5.
See if that fixes your problem.  You might also need a sex-changer.
(Gender REALLY only applies to words)

Technical details:
Minimum RS232 without hardware handshaking is wires 2,3, and 7.
One end is called the DTE and the other is the DCE.  DTE talks
on 2 and listens on 3 and uses 7 as signal ground.  DCE talks on
3 and listens on 2 and uses 7 as signal ground.  Everything works.
(note: maybe I have 2 and 3 switched, it doesn't matter.)  What
IS important is that they each talk on one and listen on the other.
For hardware handshake, there are other wires that work in a
like manner - one side talks on one and listens on the other.

If both are DTE or both are DCE, then both talk on same wire and
listen on the wire where nobody is talking.  This doesn't work.
A null modem swaps 2 and 3 inside it, and this lets a DTE talk to
a DTE or a DCE talk to a DCE.  It also swaps handshake lines,
in case these are needed. (5,8,20 as if you cared)

DTE=data TERMINAL equipment (have male or female RS232
  connections - always male on PC's and RS6000's)
DCE=data COMMUNICATION equipment (i.e. modem), usually
  have female RS232 connectors
Sample null modem wiring:
1---1   2---3   4---5
7---7   3---2   5---4  
6&8---20  20---6&8

Radio shack also sells a nifty little RS232 MiniTester.  This has
lights that monitor the different wires.  If you plug this into each
of the RS232 interfaces, you can determine whom is speaking
on which wires and KNOW if you need a null modem.  If they are
both talking on 2, then yes.  If they are both talking on 3, then yes.
If one talks on 2 and the other talks on 3, then you have a different
problem.  The other lights show the handshaking and help you
figure that out, too.

On Fri, 27 Oct 2000 16:14:31 -0500, Dave Waller
!I am trying to set up a dumb terminal on a 7318 S20 (Comunications
!Server) and I am stuck on the options that I need to set for it to
work.
!
!By default all of the ports are set up to accomodate a IBM 3151
!terminal.  I have 1 of those and a heap of ADDS terminals.  The 3151
!works like a charm.  The ADDS blink their cursor and that is it.
!
!I have tried a good number of combinations and am not getting any
!where.  I believe that I need to turn on software flow control, and
am
!not sure how.
!
!Any advice would be great.
!
!Dave Waller
Fix my email address by removing "no" words and the "com.ercial"
.  Don't kill Clinton or spy encrypted h-bombs or trust the NSA
or weed the Columbian plot for bricks of dollars.

 
 
 

stty questions

Post by Mark Whetze » Fri, 03 Nov 2000 03:18:06



Quote:> By default all of the ports are set up to accomodate a IBM 3151
> terminal.  I have 1 of those and a heap of ADDS terminals.  The 3151
> works like a charm.  The ADDS blink their cursor and that is it.
> I have tried a good number of combinations and am not getting any
> where.  I believe that I need to turn on software flow control, and am
> not sure how.

Its most likely not 'software' flow control problem, but a hardware one.

In addition to that follow up by John to your question,
there is more needed for AIX systems than wires 2,3 an 7.

RS6000 systems also like to see some status and handshake lines active.

You will need DSR high (data set ready), and CD (carrier detect) high.
As well as RTS (ready to send) and CTS (clear to send) high.

As noted, transmit data (TD) must be talking to receive data (RD).
Now.. if BOTH are wired 'standard' both are talking on pin 2
but..but.. pin 2 is the talker, not listener..

Solution:  Null Modem.
  Data Communications Equipment (DCE) wiring versus
  Data Terminal Equipment (DTE) wiring.

Not all null modem cables and dongles have the same wiring.
SOME null modems cross 2 and 3 only.  Others also cross 4 and 5  
and tie 6,8 and 20 high.
But to tie them high, one of the units must be driving the lines high.
The best way is to have pin 20 of the 'terminal' which SHOULD be
driving pin 20 high, wire that to pins 6 and 8 of the receiver.

That way, the 'terminal' is also driving CD and DSR simulating a modem.
If CD drops (when you power off the terminal), then the connection
should break, logging out the user.

Like this:
  term   comp
   2 ---- 3
   3 ---- 2
   4 ---- 5
   5 ---- 4
   20 --- 6 and 8
6,8  ---  20

For your reference.. RS232 'standard' is not really a standard.
The RS232 spec sets the SIGNAL voltage levels, but
there is no PIN standard, only a de-facto standard.

       EIA INTERFACE PINS

   PIN  CIRCIT  SOURCE   DESCRIPTION
    1     AA             FG   = FRAME GROUND
    2     BA      T      TD   = TRANSMITTED DATA
    3     BB      C      RD   = RECEIVED DATA
    4     CA      T      RTS  = REQUEST TO SEND
    5     CB      C      CTS  = CLEAR TO SEND
    6     CC      C      DSR  = DATA SET READY
    7     AB             SG   = SIGNAL GROUND
    8     CF      C      CD   = RECEIVE CARRIER DETECT
    9             C      +    = POSITIVE DC TEST VOLTAGE
   10             C      -    = NEGATIVE DC TEST VOLTAGE
   11     --      ---    N/C  = OPEN
   12     SCF     C      SCD  = SECONDARY CARRIER DETECT
   13     SCB     C      SCTS = SECONDARY CLEAR TO SEND
   14     SBA     T      STD  = SECONDARY TRANSMITTED DATA
   15     DB      C      TCLK = TRANSMIT CLOCK
   16     SBB     C      SRD  = SECONDARY RECEIVED DATA
   17     DD      C      RCLK = RECEIVE CLOCK
   18             C      ???  = RECEIVE DIBIT CLOCK
   19     SCA     T      SRTS = SECONDARY REQUEST TO SEND
   20     CD      T      DTR  = DATA TERMINAL READY
   21     CG      C      SQ   = SIGNAL QUALITY DETECT
   22     CE      C      RI   = RING INDICATOR
   23     CH/CI   T/C    ???  = DATA RATE SELECT
   24     DA      T      ???  = EXTERNAL TRANSMIT CLOCK
   25             T      ???  = BUSY

Enjoy.
--
Mark Whetzel     My comments are my own, not my company's.
Western Geophysical - A division of Baker Hughes

VOICE: (713) 689-2544              FAX: (713) 689-2758

 
 
 

1. Another stty question.

Monday, I posted a question relating to the following:  

I'm trying to use stty to set the values of a terminal that I then
want to open with an application I've written.  

   I "stty blablabla < /dev/tty00" and when I then look at it with
"stty -a < /dev/tty00", it's values are as they were before my first
stty.  

   Several people have told me that this is the way it's supposed
to work.  As I now understand it, the stty opens the port and sets
it's values, but closes the port, undoing the changes, when it
exits.  

   I've looked at the man page for stty, and I just don't get it.  

   Is there a way to set a port's values, then open that port in
an app while preserving those values, and set additional values
with tcsetattr?  

   I've been contracted to do a small project.  I would like the
user to change the com port values without setting entries for
tcsetattr, and then recompiling.  My client wants this program to
be portable between Solaris to DOS, and I want to minimize the
volume of code in conditional compile clauses.  

                                                          Thanks
                                                          Larry

2. Help: Free JDBC Driver

3. Stty Question

4. NCSA 1.5a on Linux 1.2.13 SIGSEGV's

5. stty question

6. Linux Network API

7. Apache Tunning??

8. An stty question

9. Another stty question....

10. Stty questions for serial port modem

11. Newbie stty question