RE: Telebit T1600 Summary

From: steve@icad.COM
Date: Sat Jan 11 1992 - 18:09:57 CST

Last week I wrote requesting assistance with configuring a Telebit
T1600 modem for use with a Sun 3/260. I received a number of
responses which helped me to get my modem configured. I also shared
my own setup and the responses I received with a dozen or so people
who had requested summaries. Since then I have found that some of my
users are having difficulties dialing into the T1600 at 2400 and 1200
baud. After speaking with Telebit technical support, I have worked
around this problem by switching to xon/xoff flow control. This can
be accomplished by setting S68 and S58 to 3 (ATS58=3 S68=3 &w &w1).
This corrected most of our problems though we are still having some
difficulty with emacs which uses Ctl-s for its isearch-forward key
binding and Ctl-q for its quoted-insert key binding. We have worked
around this problem by rebinding these functions when the user is on a
dialup line.

For the sake of anyone else who is considering using a T1600 or having
difficulty configuring one I am sending my current setup along with
the responses I received last week.

If anyone has had success in making hardware flow control work with low
speed modems I'd be interested in hearing about it.

Steve Carr, Icad, Inc. 201 Broadway
Internet: Steve@ICAD.COM Cambridge, MA 02139
Phone: (617) 868-2800; FAX: (617) 577-8085

# @(#)ttytab 1.4 88/02/07 SMI
# name getty type status comments

console "/usr/etc/getty std.9600" sun on unsecure # Tim's Office
ttya "/usr/etc/getty std.9600" unknown off # cua0 and ttyd0
ttyb "/usr/etc/getty std.9600" unknown off # cua1 and ttyd1
ttyd0 "/usr/etc/getty std.19200" dialup on # The Telebit Modem
ttyd1 "/usr/etc/getty std.19200" dialup on # The Ventel Modem

# @(#)gettytab 1.9 89/09/27 SMI; from UCB 5.7 2/16/86
# Copyright (c) 1980 Regents of the University of California.
# All rights reserved. The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
# Most of the table entries here are just copies of the
# old getty table, it is by no means certain, or even likely,
# then any of them are optimal for any purpose whatever.
# Nor is it likely that more than a couple are even correct

# The default gettytab entry, used to set defaults for all other
# entries, and in cases where getty is called with no table name
        :ap:lm=\r\n%h login\72 :sp#9600:

# Fixed speed entries
# The "std.NNN" names are known to the special case
# portselector code in getty, however they can
# be assigned to any table desired.
# The "NNN-baud" names are known to the special case
# autobaud code in getty, and likewise can
# be assigned to any table desired (hopefully the same speed).
        :ep:nd#1:cd#2:td#1:fd#1:sp#150:ht:nl:lm=\E\72\6\6\17login\72 :


File Permissions:

crw------- 1 uucp 12, 128 Jan 6 12:38 /dev/cua0
crw------- 1 uucp 12, 129 Jan 6 09:41 /dev/cua1
crw--w--w- 1 root 12, 0 Jan 6 10:16 /dev/ttyd0
crw--w--w- 1 root 12, 1 Jan 6 06:54 /dev/ttyd1

Telebit Register Contents:

T1600 - Version LA1.02 - Configuration A
 B1 E1 L2 M0 Q2 T V1 X2 Y0
&C1 &D3 &G0 &J0 &L0 &Q0 &R0 &S0 &T4 &X0
S000:1 S001=0 S002=43 S003=13 S004=10 S005=8 S006=2 S007=40
S008=2 S009=6 S010=14 S011=70 S012=50 S018=0 S025=5 S026=1
S038:5 S041:5 S045=0 S047=4 S048=0 S050=0 S051:5 S056=17
S057=19 S058=3 S059=0 S060=0 S061=1 S062=15 S063=0 S064=0
S068:3 S069=0 S090=0 S093=8 S094=1 S100=0 S102=0 S104=0
S105=1 S111=255 S112=1 S180=2 S181=1 S183=25 S190=1 S252=0



I have installed it as a dialup modem on a sparc to. I found that
attaching it to a dumb terminal for the modem configuration worked much
better than configuring it while it was connected to the sparc. Anyway,
this is what I wrote up.

    How to setup a Telebit 1600 as a dialup modem connected to a Sparc II

(You will need a straight DB25 cable (male/male))


To configure modem please attach to dumb terminal.

Next, enter the following string:

AT&F s45=0 s51=5 &s0 &c1 &d3 s61=0 s58=2 s63=0 s68=255 s111=30 s190=1 s0=1 &w

The modem should reply with OK.

Now, turn of verbose features:

AT e0 q1 &w

The modem should NOT reply with OK.

Do this with both setup a and b.

        Explanation of settings:
        ( &F) restore factory setting.

        (s45=0) Disable remote access to control functions of the modem from a
                remote modem

        (s51=5) set DTE speed to 19200--determines data rate between modem and
                 local DTE

        ( &s0) data set ready is always on

        ( &c1) data carrier detect on when carrier detected from remote modem

        ( &d3) modem resets and enters command mode when the DTR signal is
                 switched from on to off.

        (s58=2) use full duplex RTS/CTS flow control. When RTS is OFF the
                modem will not send data to the local DTE. When RTS is ON the
                modem will send data to local DTE.

        (s61=0) Break is processed as defined in register 63

        (s63=0) Break is processed in sequence with the data.

        (s68=255) Use the flow control defined by s58

        (s111=30) Use uucp transfer protocol. (can be set to kermit,xmodem too)

        (s190=1) Data comression disabled in both directions.

        ( &w) write these new values in EEPROM bank.


   This will create the entry in /dev needed to dial out with the modem.

        cd /dev

        mknod cuaa c 12 128

        mknod ttyda c 12 0

        chmod 666 cuaa ttyda


        cd /etc

        --- edit /etc/ttytab and etc:

        ttya "/usr/etc/getty std.9600" dialup off secure


        ttyda "/usr/etc/getty std.19200" dialup on secure

        --- restart getty on ttya:

        kill -1 1

        --- make sure the following is not commented out in /etc/rc

                /usr/etc/ttysoftcar -a > /dev/null 2>&1

        --- enter the following command

                /usr/etc/ttysoftcar -a

These are the settings of the modem as it is now.

T1600 - Version LA1.00 - Active Configuration
 B1 E0 L2 M1 P Q1 V1 X1 Y0
&C1 &D3 &G0 &J0 &L0 &Q0 &R3 &S0 &T4 &X0
S000:1 S001=0 S002=43 S003=13 S004=10 S005=8 S006=2 S007=40
S008=2 S009=6 S010=14 S011=70 S012=50 S018=0 S025=5 S026=1
S038=0 S041=0 S045=0 S046=0 S047=4 S048=0 S050=0 S051:5
S056=17 S057=19 S058:2 S059=0 S060=0 S061:0 S062=15 S063=0
S064=0 S068=255 S069=0 S090=0 S093=8 S094=1 S100=0 S102=0
S104=0 S105=1 S111:30 S112=1 S180=2 S181=1 S183=25 S190=1
S253=10 S254=255 S255=0


make sure /dev/cua1 is there correctly with "ls -ldg /dev/cua1"

crw------- 1 uucp daemon 12, 129 Jan 2 13:46 /dev/cua1

the number following the word "flags" on the zs0 device in the kernel
configuration file in the "/sys/sun3/conf" directory is used to control
hardware/software carrier detect. i believe the first bit is for ttya,
the second is for ttyb. having a bit set to "1" turns software carrier
detect on, while not having the bit set makes it hardware carrier detect.
i usually just set flags to "0", but if you're just using ttyb for a
modem and not ttya, then setting flags to "1" should set ttyb for
hardware carrier detect. here's an example of setting flags to 0 (it
starts out as "3").

device zs0 at obio ? csr 0x20000 flags 0 priority 3

you must then make a new kernel, install it, then reboot.

it is important to have this flag set correctly, since someone who logs
in, but gets cut off unexpectedly (hanging up the line on the other end
without logging out) may leave the person logged in so that the next
person who dials in will get the shell of the the previous user.


ttysoftcar doesn't always work the tty is already open (by getty
for example). Make sure Telebit is handling the carrier detect
signal properly. If you are using the modem for dialin/dialout,
you should have CD come on only when the modem answers a call.
Using cua1 (ttyd1 minor number plus 128) is supposed to ignore
carrier, but won't the open will fail if ttyd1 is already open.

When you do a 'ps' your getty for ttyd1 should show '?' as the
tty instead of 'd1' if the carrier is working right, and
you did 'ttysoftcar n'.


I can give you a summary of a question that I asked a while ago, which
was not specifically about the Telebit, but about "all ports busy".

----- Begin Included Message -----

My initial message:

** I know this has happened to other people before, but I have never seen
** a satisfying answer to this:
** We are using serial port B for diagnostics using the command
** tip hardwire
** The message
** all ports busy
** gets displayed. We checked the /usr/spool/uucp directory; no locks. The
** /usr/lib/lpd daemon (which was running on that port before) is not running.
** The entry in the kernel configuration file is
** device zs0 at obio ? csr 0x20000 flags 3 priority 3
** The entry in /etc/remote is
** hardwire:\
** :dv=/dev/ttyb:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
** System is a Sun-3/160 running SunOS 4.0.3. and /dev/ttyb has mode 0666.
** It seems that using "tip" as superuser works, but any other user encounters
** the dreaded error message (I say "seem" because this is being run 6000 miles
** from here and I don't have the ability to run tests at will...).

Clumped together, here are the suggestions:

Make sure that tip (probably setuid uucp) can write into /var/spool/uucp.

Here is another suggestion. You may want to make sure that the binary for
'tip' lists as :

        -rws--x--x 2 uucp daemon 57344 Apr 24 1989 /bin/tip*

This would make sense, since we *have* to write in /usr/spool/uucp, which
is owned by user "uucp" (or should be!). Of course, "root" can write there,
but other users can't. If the ownership is incorrect, do a

        # /etc/chown -R uucp.staff /usr/spool/uucp
        # /etc/chmod 2755 /usr/spool/uucp

Could it be permissions/ownership on the port? On my Sparc 1,
running 4.1.1, the permissions/ownerships are set to:
crw------- 1 uucp staff 12, 128 May 22 20:41 /dev/cua0
crw-rw-rw- 1 root staff 12, 0 Apr 17 11:11 /dev/ttya
crw-rw-rw- 1 root staff 12, 1 Apr 17 11:11 /dev/ttyb

Also, make sure you do not have an init sitting on ttyb. Check /etc/ttytab.
The entry here for that line is:

ttyb "/usr/etc/getty std.19200" network on remote

Not surprized. First, please establish whether /dev/zs0 drives the
mouse or the serial ports. On my 3/60, zs0 is the mouse, keyboard, et cetera
port while zs1 is for the serial ports, ttya ttyb. Assuming your
3/50 is the same, then you'll want this line in your kernel fot ttyb:

device zs1 at obio ? csr 0x00000 flags 0x103 priority 3

This little line says use the hardware DCD instead of the software emulation.

As you have configured, assuming zs0 is the correct device, the ports are
using software emualtion of DCD. Thus you'll always busy out.

You will want to make sure that noone has a background job running on
the port. These can occur when someone logs in, runs a background job
and then logs off thinking that all is well. We see this frequently.

Until you mentioned that root seems to not be affected, I was going to
claim that the modem was a Telebit. They are notorious for needing a
periodic power cycle.


----- End Included Message -----


Have you checked the permissions on /dev/cua1
and /dev/ttyb? They (especially cua1) needs to
be writable by user "uucp" for tip to work


  Do you own a breakout box? If so check to see what the status of
  CD is with reagrds to DTR. I had the same problem and found that
  by setting S130 correctly that I got things working. Please note that
  I have a T2500. The register you might want to look at might be diffrent
  on the T1600.

  Anyway, hope I was able to at least point you in the right direction.

  Send me mail reminding me to get you some documentation thats on UUNET
  regarding Telebit modems and Suns. I don't have time to get it now.


Make sure the mode on cua1 is 644 and the device is owned by user "uucp".


I have a Telebet on ttyb on our 4/280 running 4.1. It works fine, in and
out. So I looked at my system to see how it differs from yours. You said:

> The modem is attached to ttyb.

But you showed:

> /etc/ttytab entry
> ttyd1 "/usr/etc/getty std.9600" dialup on # The Telebit T1600

My corresponding line is:

ttyb "/usr/etc/getty std.19200" network on remote

You didn't show the device special files, but mine look like this:

crw-rw-rw- 2 root 12, 129 Jan 3 09:50 /dev/cua1
crw--w--w- 1 root 12, 1 Jan 3 09:42 /dev/ttyb

Finally, here is a blurb from my archives that I found useful in connecting
my modem. It's worth saving. Good luck.

Telebit Corporation Revision 1.02 01 APRIL 1990


The following examples should allow easy initialization of a TELEBIT modem
for use with dialin/dialout and UUCP on a SUN 3 or SUN 4 workstation with

   NOTE: These configuration instructions are meant for SUNOS 4.0.3 or
          higher release versions. It is highly recommended that the
          operating system be upgraded to this release version or that
          the TTY PATCH 5.4 (or higher) be installed before these set-ups
          are attempted. This patch is available from SUN.

   First, the kernel must be modified so that the modem can dial/answer calls.

        cd /usr/sys/conf

        cp GENERIC MODEM

        ------edit MODEM-- change:
                device zs0 at obio ? csr 0x20000 flags 3 priority 3
                device zs0 at obio ? csr 0x20000 flags 0 priority 3
        -----save the file.

        /etc/config MODEM

        cd ../MODEM


        mv /vmunix /vmunix.old

        mv /usr/sys/MODEM/vmunix /vmunix

        ---reboot the system----------

2. CREATE THE DIAL OUT DEVICE (if necessary):
   This will create the entry in /dev needed to dial out with the modem.

        cd /dev

        mknod cua0 c 12 128

        mknod cub0 c 12 129

        chmod 666 cua0 cub0

   References to the dialout port in this document assume the ttya port "cua0".
   Connections to ttyb are accomplished by using "cub0".

   NOTE: It is highly recommended that TELEBIT modems be connected to the
          serial I/O ports ttya and ttyb. Use of serial I/O multiplexors
          may limit modem speed to 9600 bps or lower due to flow control,
          cpu/bus interrupt, or memory buffer problems.

3. MODIFY /etc/remote
   Add this entry (all characters are literal, i.e. the ^ is 'shift 6'
   on the Sun):


   The following /etc/remote may be used for autodialing:

        NOTE: Be sure to set X0, in the modem, when using autodial.

        TELEBIT|Autodial TELEBIT:\


        SSSSS = baud rate [9600/19200]
      NNNNNNN = phone number

   In order to configure your TELEBIT modem correctly, it is best to start
   by resetting the modem to factory settings. Please consult your TELEBIT
   modem reference manual for the proper modem resetting procedure.
   Once the reset is completed, tip to the modem using "tip tb9600" and
   configure it with the command string below:

 AT&F S45=0 S51=5 S52=2 S53=3 S54=3 S58=0 S66=1 S68=3 S110=1 S111=30 Q6 &W<CR>

   This string (the spaces are optional if you prefer to remove them) will:
         - 1st (&F) recalls factory defaults (start with known configuration).
         - 2nd (S45=0) disables remote access. S45=255 sets remote access ON.
                Remote access will allow TELEBIT technical support to
                access and configure your modem, should this be required.
                Remote access is set to OFF in ALL factory shipped modems.
                A hardware reset will set remote access to ON.
         - 3rd (S51=5) sets the serial port to 19200 bps.
         - 4th (S52=2) says drop the connection when DTR is dropped to the modem
                and reload the modem's stored EEPROM values (do a soft reset).
         - 5th (S53=3) sets DSR "ON" when modem is off-hook.
                It also sets DCD "ON" when carrier is detected.
                NOTE: S53 maps to registers S130 and S131 in Release B_5.00,
                        GA1.00, FA2.00, and above firmware. If S53 is not
                        present in your modem firmware, be assured that its
                        settings will map to the proper registers.
         - 6th (S54=3) says pass BREAKs through the modem transparently.
         - 7th (S58=0) disables flow control.
                The UUCP protocol support handles flow control instead.
         - 8th (S66=1) locks the interface speed.
                This is necessary during connections with slower modems.
         - 9th (S68=3) XON/XOFF flow control from DCE.
                This setting will allow flow control for interactive sessions.
         - 10th (S110=1) enables data compression between TELEBIT modems.
                If desired, S110=0 will disable this feature.
         - 11th (S111=30) enables TELEBIT's UUCP "g" protocol support.
         - 12th (Q6) silences the modem when an inbound call arrives.
                This prevents getty-battles between the RING result code and
                getty's echo of the same.
         - 13th (&W) writes these new values into the current EEPROM bank (1/2).
                This saves the new values as the modem's power on defaults, for
                either bank A or B, until you change them again.
         - 14th (<CR>) executes the command line in the modem.

   Upon execution of the command line, the serial interface speed will be
   changed to 19200 bps. As a result of this action, garbage characters
   will be echoed as a response to any input. Exit tip using the "~."
   command. Use "tip tb19200" to access the modem at 19200 bps.

    NOTES: (1) S58 sets the type of flow control to be used by the
                     modems serial I/O port. It is highly recommended that
                     RTS/CTS (hardware) flow control (S58=2) be used whenever
                     possible. Please consult your systems manuals for
                     instructions on proper software and hardware
                     configurations for RTS/CTS flow control. Some hardware
                     systems or operating systems may not be capable of this

                (2) S92 governs the sequence of modulation tones issued
                     upon auto answer. To reverse the answering sequence,
                     set S92=1, this will solve any "slow modem" connection
                     problems caused by the issuance of PEP tones. ALL
                     incoming PEP modems should have S50=255 set to connect
                     using PEP.

                (3) If you would like to limit dialin/dialout connection
                     access to high-speed (PEP mode), add "S50=255" to the
                     above script to force the modem to use only the PEP mode.
                     To allow dial OUT to slower speed modems, modify the
                     L.sys script (noted below in step 7) to:

   hostname Any cua0 19200 cua0 "" ATX0S50=0\r OK ATDNNNNNNNNNN\r CONNECT ""
    ""-\r-login:-\r-login:-\r-login: \r login: Uyoursysname ssword: XXXXXXXX


        cd /etc

        --- edit /etc/ttytab and etc:

        name getty type status comments

        ttya "/usr/etc/getty std.9600" dialup off secure


        name getty type status comments

        ttya "/usr/etc/getty std.19200" dialup on secure

        --- restart getty on ttya:

        kill -1 1

   The use of a rotary or autobaud in getty is not recommended due to the
   modems ability to lock interface speed (S66=1). The modem can then
   arbitrate a slow modem connection to the hard-set interface speed without
   the need for interface speed matching.

   If a rotary/autobaud getty is used, don't forget to set your getty to
   include 19200 in its cycle. You may have it trying 19200 first and moving
   to 2400 on the 1st receipt of a break and to 1200 on the second receipt of
   break. The order of the cycle is not important so long as the calling
   system knows to send breaks until it sees the login sequence.

6. MODIFY /etc/uucp/L-devices:
   Add the following entry to your L-devices file. Fill in the correct port

       ACUHAYES cua0 cua0 19200
       DIR cua0 0 19200

7. MODIFY /etc/uucp/L.sys:
   Do not copy this literally. Modify the information for your application.
   Also note that this is ONE line of data, not two.

   hostname Any cua0 19200 cua0 "" ATX0S50=255\r OK ATDNNNNNNNNNN\r CONNECT ""
    ""-\r-login:-\r-login:-\r-login: \r login: Uyoursysname ssword: XXXXXXXX

   hostname = THEIR System name
   NNNNNNNNNN = THEIR System phone number
   Uyoursysname = Your UUCP account on THEIR machine
   XXXXXXXX = Your UUCP passwd on THEIR machine

   The "chat" script is the most common point of wasted connection time and
   login failure. Be sure to test this entry rigorously to verify a successful
   login in the fastest time possible.


   NOTE: SUNOS 4.X is capable of 19200 bps UUCP file transfers. There is
          no longer any need for modification of "uucico".

   UUCP can now be tested by issuing the following command:

     /usr/lib/uucp/uucico -r1 -x4 -shostname

   Upon success or failure of the UUCP session, the status file must be
   removed before another UUCP session can be started with the above command.

     rm /usr/spool/uucp/STST.hostname

You should now be able to run UUCP between two machines attached to your
modems just as you always have with slower modems. Enjoy the new world of
high speed UUCP "g" via TELEBIT modems.


Well, here's my generic modem problem response included below:

E1 F1 M1 Q6 T V1 W0 X1 Y0 &P0 &T4     Version BA5.01
S00=001 S01=000 S02:255 S03=013 S04=010 S05=008 S06=002 S07:060 S08=002 S09=006
S10=007 S11=070 S12:255 S18=000 S25=005 S38=000 
S41=000 S45:255 S47:100 S48=000 S49=000
S50:255 S51=255 S52:002         S54:003 S55:003 S56=017 S57=019 S58=003 S59=000
S60=000 S61:100 S62=003 S63=001 S64:001 S65=000 S66:001 S67=000 S68:003 S69=000
S90=000 S91=000 S92:001 S94=001 S95=000 S96=001 
S100=000 S101=000 S102=000 S104=000 S105=001 
S110:001 S111:030 S112=001 
S121=000 S130:003 S131:001 S255=000 

The above is the settings I use on our telebit. The entries with the : are the changed ones from the default, an = means it is the default setting. Use the AT&C1 command on a hayes type modem and AT&S1 followed by a AT&W

On a telebit use ATS130=4 ATS131=1 AT&W.

Make sure that the modem does CD so that CD is only on when the modem has a carrier, modems do not come default this way.

Also make sure and don't use tip or cu in a cmdtool. A shelltool, or right on the console is OK. cmdtool does not work with tip or cu.

One other problem I had, with some modems, login responds so fast that it made the modem hang up (the modem apparently hadn't finished with it's initialization). You can verify this problem by using a breakout box on the serial port and removing the offending pin from the Sun that sends the login string out to the modem (either pin 2 or 3 I can't remember which). The modem will no longer hang up and if you plug the pin back in about 1 second later, the modem does not hang up immediatly after answering any more. You may need to use the "de" option in gettytab to delay the login prompt.

Other gotchas are the ttysoftcar command in 4.1 and above, this hangs on a port that has a getty on it, turn the getty off first. When using a modem, set up hardware carrier detect.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:34 CDT