[comp.unix.i386] com2 under 386/ix

larry@nstar.UUCP (Larry Snyder) (09/03/89)

I am having a problem getting COM2 up and running under Interactive
Unix V 3.2 2.02.  COM1 works just fine, but I want to run multiple
serial ports using uucp to make outgoing calls.  
-- 
Larry Snyder             uucp: iuvax!ndcheg!ndmath!nstar!larry
The Northern Star Usenet Distribution Site, Notre Dame, IN USA

izen@amelia.nas.nasa.gov (Steven H. Izen) (09/03/89)

In article <16@nstar.UUCP> Larry Snyder says
>I am having a problem getting COM2 up and running under Interactive
>Unix V 3.2 2.02.  COM1 works just fine, but I want to run multiple
>serial ports using uucp to make outgoing calls.  

I'm using 386/ix 2.0.1 with their standard asy driver, with both ports 
connected to 2400 baud modems.  I use COM2 for UUCP with no problems, and with
a modification of their sysadm scripts I use COM1 for both dial in and dial
out, toggling between the two states with a hacked copy of the sysadm scripts.

To enable COM2 I added a line to cd /etc/conf/sdevice.d/asy  to make it look
like the following:

asy     Y       1       7       1       3       2f8     2ff     0       0
asy     Y       1       7       1       4       3f8     3ff     0       0

then rebuilt the kernel.  I don't remember whether I had to use mknod to set up
the special device /dev/tty01, but if you have to, as root type

mknod /dev/tty01 c 3 1

(I haven't been able to get the modem control minor device to work-the driver
just hangs for some unkonown reason when I use minor device 17).

Incidentally, as far as the uugetty problem goes,  I borrowed a copy of the 
uugetty from a friend using Intel (nee Bell Tech) unix, to see if it would work
right.  His didn't work right either under 386/ix, but he claims it does work
right on his system.

One more comment on setup of the incoming port.  I found that I needed to 
disable the modem's messages (eg. connect 2400) to prevent the modem and 
uugetty from going into a infinite loop upon disconnect. The modem was saying
"no carrier" and uugetty thought that was an attempt to login, sent characters
to the modem which were promptly echoed back,etc.  Many months later, while
bugging :-) ISC tech support about some other problems I mentioned that one.
I figured they'd tell me how to do it correctly.  They told me to do what I
described above.  Does anyone out there know a better way?  Obviously turning
off the messages will break any uucp communications going out on that line, and
since I read here on the net that ISC claims to have fixed uugetty...

			Steve Izen
-- 
Steve Izen: {sun,decvax,uunet}!cwjcc!skybridge!izen386!steve
or steve%izen386.uucp@skybridge.scl.cwru.edu
or izen@cwru.cwru.edu

larry@nstar.UUCP (Larry Snyder) (09/03/89)

In article <3064@amelia.nas.nasa.gov>, izen@amelia.nas.nasa.gov (Steven H. Izen) writes:
> In article <16@nstar.UUCP> Larry Snyder says
> 
> To enable COM2 I added a line to cd /etc/conf/sdevice.d/asy  to make it look
> like the following:
> 
> asy     Y       1       7       1       3       2f8     2ff     0       0
> asy     Y       1       7       1       4       3f8     3ff     0       0

Works like a champ. Thanks much.  I didn't find anything about this
in the documentation - but then we all know that the documentation is 
excellent!

My next project is to try adding multple com ports (COM3 and COM4).  First
I'll try on IRQ3 and 4 then I'll try placing them on the same IRQ (5). 

Thanks..


-- 
Larry Snyder              uucp:iuvax!ndcheg!ndmath!nstar!larry
The Northern Star Usenet Distribution Site, Notre Dame, IN USA

jml@tw-rnd.SanDiego.NCR.COM (Michael Lodman) (09/05/89)

In article <23@nstar.UUCP> larry@nstar.UUCP (Larry Snyder) writes:
>Works like a champ. Thanks much.  I didn't find anything about this
>in the documentation - but then we all know that the documentation is 
>excellent!
 
I had this problem and fixed it and then called Interactive to complain.
They were QUITE defensive about it. I would guess that they are getting
beat up on about the quality of their documentation, maybe deservedly so.

-- 
+-----------------------------------------------------------+
| Michael Lodman               Mike.Lodman@SanDiego.NCR.COM |
| NCR Corporation  -  Distributed Systems Lab  -  San Diego |
| 9900 Old Grove Rd.  San Diego, CA.  92131  (619) 693-5353 |
+-----------------------------------------------------------+

marc@dumbcat.UUCP (Marco S Hyman) (09/07/89)

In article <3064@amelia.nas.nasa.gov> izen@cwru.cwru.edu (Steven H. Izen) writes:
>
> To enable COM2 I added a line to cd /etc/conf/sdevice.d/asy  to make it look
> like the following:
> 
> asy     Y       1       7       1       3       2f8     2ff     0       0
> asy     Y       1       7       1       4       3f8     3ff     0       0
> 
> (I haven't been able to get the modem control minor device to work-the driver
> just hangs for some unkonown reason when I use minor device 17).

The configuration lines, as given above, do not enable the modem control
ports.  The third field (number of sub-devices supported by driver) must be
changed to a 2 to enable the modem control ports.  Also, I've had problems
depending upon the order the lines are given.  What works (with 386/ix
2.0.2) is:

asy	Y	2	7	1	4	3f8	3ff	0	0
asy	Y	2	7	1	3	2f8	2ff	0	0

After the kernel is built and you've re-booted you should have the following
device files:

crw-rw-rw-   1 root     root       3,  0 Sep  6 22:50 /dev/tty00
crw-rw-rw-   1 root     root       3,  1 Sep  6 22:48 /dev/tty01
crw--w--w-   1 uucp     root       3, 16 Sep  6 22:50 /dev/ttyd0
crw-rw-rw-   1 root     root       3, 17 Sep  6 22:48 /dev/ttyd1

Change your inittab so it fires up a uugetty on the appropriate port.
(Caveat: I've only used ttyd0 -- ttyd1 is untested).  My entry looks like:

	00:234:respawn:/usr/lib/uucp/uugetty -r -t 60 ttyd0 DIAL96

(The DIAL96 is a home grown gettydefs entry).

> One more comment on setup of the incoming port.  I found that I needed to 
> disable the modem's messages (eg. connect 2400) to prevent the modem and 
> uugetty from going into a infinite loop upon disconnect.

This is not a problem with the above setup.  The modem is configured according
to the recommendation in /usr/lib/uucp/Dialers.  I did modify the entries to
do an AT, not an ATZ, for no particular reason.

#   Hayes Smartmodem -- new BNU modem control capabilities
#   If you do not want to strap CD on, use these switch settings:
#
#       S1 - UP		S2 - UP		S3 - DOWN	S4 - UP
#       S5 - UP		S6 - UP		S7 - ?		S8 - DOWN
#
hayes	=,-,	"" \M\dAT\r\c OK\r \EATDT\T\r\c CONNECT \m\c
direct	=,-,	"" \M\dAT\r\c OK\r \c
#
#  Furthermore, you must add a ",M" subfield to the line field (field
#  2) of the associated Devices file entries, as shown here:
#
#	ACU culd0,M - 1200 hayes \T

For the newer modems the switch settings are the equivalent of

	AT &D2 V1 Q E1 S0=1 &C1 &S1

followed by an AT&W to write the configuration to NVRAM.

> "no carrier" and uugetty thought that was an attempt to login, sent characters
> to the modem which were promptly echoed back,etc.  Many months later, while
> bugging :-) ISC tech support about some other problems I mentioned that one.
> I figured they'd tell me how to do it correctly.  They told me to do what I
> described above.  Does anyone out there know a better way?  Obviously turning
> off the messages will break any uucp communications going out on that line, and
> since I read here on the net that ISC claims to have fixed uugetty...

The above worked great on 2.0.1.  However, since upgrading to 2.0.2 (last
night) I've had problems.  Every so often the message

INIT: Command is respawning too rapidly....
id:  00 "/usr/lib/uugetty ...

shows up on the console.  I don't know what triggers it yet as it seems to
show up without any activity on the serial port.  The uugetty is gone and
must be restarted with a kill -1 1.  It will also start itself after a
period of time, but dailins are disabled in the meanwhile.  [DTR is dropped
to the modem so it does not answer the phone if programmed correctly.]

So, when you can find the (missing) documentation you can piece together an
almost working system.  It's not a broken as several people have posted, but
it's not as good as it could be either.

--marc
-- 
// Marco S. Hyman
// ...!pacbell!dumbcat!marc